From adb13709e374c8d1fe4720472e85c7f8d560da3e Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 29 Oct 2024 16:15:38 -0500 Subject: [PATCH] ironic: allow extra containers for the conductor Add the ability to specify init and running containers for the conductor pods. Change-Id: I88657a8d656f0ef5da56f75fca637ca6938f99d8 Signed-off-by: Doug Goldstein --- ironic/Chart.yaml | 2 +- ironic/templates/statefulset-conductor.yaml | 6 ++++++ ironic/values.yaml | 6 ++++++ releasenotes/notes/ironic.yaml | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ironic/Chart.yaml b/ironic/Chart.yaml index ab686d66ae..7397b3a3da 100644 --- a/ironic/Chart.yaml +++ b/ironic/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Ironic name: ironic -version: 0.2.18 +version: 0.2.19 home: https://docs.openstack.org/ironic/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Ironic/OpenStack_Project_Ironic_vertical.png sources: diff --git a/ironic/templates/statefulset-conductor.yaml b/ironic/templates/statefulset-conductor.yaml index bcf6238c76..f3e68167f3 100644 --- a/ironic/templates/statefulset-conductor.yaml +++ b/ironic/templates/statefulset-conductor.yaml @@ -162,6 +162,9 @@ spec: - name: pod-shared mountPath: /tmp/pod-shared {{- end }} + {{- with .Values.conductor.initContainers }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} containers: - name: ironic-conductor {{ tuple $envAll "ironic_conductor" | include "helm-toolkit.snippets.image" | indent 10 }} @@ -251,6 +254,9 @@ spec: mountPath: /var/lib/openstack-helm {{ if $mounts_ironic_conductor.volumeMounts }}{{ toYaml $mounts_ironic_conductor.volumeMounts | indent 12 }}{{ end }} {{- end }} + {{- with .Values.conductor.extraContainers }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} volumes: - name: pod-tmp emptyDir: {} diff --git a/ironic/values.yaml b/ironic/values.yaml index a94bc3f23c..be58b1279d 100644 --- a/ironic/values.yaml +++ b/ironic/values.yaml @@ -207,6 +207,12 @@ conf: datefmt: "%Y-%m-%d %H:%M:%S" conductor: + # -- Additional containers to add to the conductor pods + ## Note: Supports use of custom Helm templates + extraContainers: [] + # -- Additional init containers to add to the conductor pods + ## Note: Supports use of custom Helm templates + initContainers: [] http: enabled: true init_script: | diff --git a/releasenotes/notes/ironic.yaml b/releasenotes/notes/ironic.yaml index 8eec867ba8..6c26aa115f 100644 --- a/releasenotes/notes/ironic.yaml +++ b/releasenotes/notes/ironic.yaml @@ -22,4 +22,5 @@ ironic: - 0.2.16 Use quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal by default - 0.2.17 Allow overriding of hostNetwork and hostIPC for Ironic conductor - 0.2.18 Use service tokens + - 0.2.19 Allow extra containers for the conductor ...