[OVS] Add .Values.openvswitch.extraContainers hook

This is aligned with the Helm best
practices when users can inject optional snippets into
template. E.g exporter sidecar suits this use case.

Change-Id: I5e0f7784f740a16314382d63717f1b749ef7903a
Signed-off-by: Vladimir Kozhukalov <kozhukalov@gmail.com>
This commit is contained in:
Vladimir Kozhukalov
2026-02-23 17:30:26 -06:00
parent f4623715f3
commit 002f4f6e9f
5 changed files with 55 additions and 1 deletions

View File

@@ -223,6 +223,9 @@ It should be handled through lcore and pmd core masks. */}}
- name: var-tmp
mountPath: /var/tmp
{{- end }}
{{- with .Values.openvswitch.extraContainers }}
{{- tpl (toYaml .) $envAll | nindent 8 }}
{{- end }}
volumes:
- name: pod-tmp
emptyDir: {}

View File

@@ -104,6 +104,7 @@ pod:
- NET_ADMIN
readOnlyRootFilesystem: true
dns_policy: "ClusterFirstWithHostNet"
lifecycle:
upgrades:
daemonsets:
@@ -209,6 +210,9 @@ manifests:
network_policy: false
secret_registry: true
openvswitch:
extraContainers: []
conf:
poststart:
timeout: 5

View File

@@ -0,0 +1,7 @@
---
openvswitch:
- |
Introduce .Values.openvswitch.extraContainers hook to make it possible to
add extra containers to openvswitch daemonset, e.g. for monitoring
purposes.
...

View File

@@ -0,0 +1,38 @@
---
openvswitch:
extraContainers:
- name: ovs-exporter
image: ghcr.io/saeed-mcu/ovs_exporter/openvswitch_exporter:v2.3.2
imagePullPolicy: IfNotPresent
ports:
- name: metrics
containerPort: 9475
protocol: TCP
livenessProbe:
httpGet:
path: /metrics
port: 9475
initialDelaySeconds: 30
periodSeconds: 60
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /metrics
port: 9475
initialDelaySeconds: 15
periodSeconds: 30
timeoutSeconds: 5
securityContext:
readOnlyRootFilesystem: true
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
volumeMounts:
- name: run
mountPath: /run
readOnly: true
...

View File

@@ -149,7 +149,9 @@
- ./tools/deployment/component/keystone/keystone.sh
- ./tools/deployment/component/heat/heat.sh
- export GLANCE_BACKEND=local; ./tools/deployment/component/glance/glance.sh
- ./tools/deployment/component/compute-kit/openvswitch.sh
- >-
export OSH_EXTRA_HELM_ARGS="--values ../openstack-helm/values_overrides/openvswitch/exporter.yaml";
./tools/deployment/component/compute-kit/openvswitch.sh
- >-
export OSH_EXTRA_HELM_ARGS="--values ../openstack-helm/values_overrides/libvirt/inovex_exporter.yaml";
./tools/deployment/component/compute-kit/libvirt.sh