diff --git a/openvswitch/templates/daemonset.yaml b/openvswitch/templates/daemonset.yaml index 34f19312ca..f93b004be2 100644 --- a/openvswitch/templates/daemonset.yaml +++ b/openvswitch/templates/daemonset.yaml @@ -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: {} diff --git a/openvswitch/values.yaml b/openvswitch/values.yaml index 46cc22c636..8552290eb6 100644 --- a/openvswitch/values.yaml +++ b/openvswitch/values.yaml @@ -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 diff --git a/releasenotes/notes/openvswitch-3401ba2f0dc8e1f6.yaml b/releasenotes/notes/openvswitch-3401ba2f0dc8e1f6.yaml new file mode 100644 index 0000000000..067da45bf5 --- /dev/null +++ b/releasenotes/notes/openvswitch-3401ba2f0dc8e1f6.yaml @@ -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. +... diff --git a/values_overrides/openvswitch/exporter.yaml b/values_overrides/openvswitch/exporter.yaml new file mode 100644 index 0000000000..271eb50d9e --- /dev/null +++ b/values_overrides/openvswitch/exporter.yaml @@ -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 +... diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index ced498f412..d63c5902fd 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -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