From 95d91b3f4db9de937d16f6b0965141bcdc27acd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20OUDRY?= <107411+seboudry@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:56:16 +0200 Subject: [PATCH] feat(helm): allow add extra volumes and mounts in Helm chart --- .../charts/burrito/templates/controllers.yaml | 6 ++++++ .../charts/burrito/templates/datastore.yaml | 6 ++++++ deploy/charts/burrito/templates/server.yaml | 6 ++++++ deploy/charts/burrito/values.yaml | 20 +++++++++++++++++++ 4 files changed, 38 insertions(+) diff --git a/deploy/charts/burrito/templates/controllers.yaml b/deploy/charts/burrito/templates/controllers.yaml index c8c4b9e9..f5827a74 100644 --- a/deploy/charts/burrito/templates/controllers.yaml +++ b/deploy/charts/burrito/templates/controllers.yaml @@ -69,6 +69,9 @@ spec: subPath: burrito-ca.crt readOnly: true {{- end }} + {{- if .deployment.extraVolumeMounts }} + {{- toYaml .deployment.extraVolumeMounts | nindent 12 }} + {{- end }} {{- with .deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -107,6 +110,9 @@ spec: - key: {{ $.Values.datastore.tls.caKey }} path: burrito-ca.crt {{- end }} + {{- if .deployment.extraVolumes }} + {{- toYaml .deployment.extraVolumes | nindent 8 }} + {{- end }} {{- if .service.enabled }} --- apiVersion: v1 diff --git a/deploy/charts/burrito/templates/datastore.yaml b/deploy/charts/burrito/templates/datastore.yaml index a8511332..20f7de26 100644 --- a/deploy/charts/burrito/templates/datastore.yaml +++ b/deploy/charts/burrito/templates/datastore.yaml @@ -69,6 +69,9 @@ spec: mountPath: /etc/burrito/tls readOnly: true {{- end }} + {{- if .deployment.extraVolumeMounts }} + {{- toYaml .deployment.extraVolumeMounts | nindent 12 }} + {{- end }} {{- with .deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -94,6 +97,9 @@ spec: secret: secretName: {{ .tls.secretName }} {{- end }} + {{- if .deployment.extraVolumes }} + {{- toYaml .deployment.extraVolumes | nindent 8 }} + {{- end }} {{- if .service.enabled }} --- apiVersion: v1 diff --git a/deploy/charts/burrito/templates/server.yaml b/deploy/charts/burrito/templates/server.yaml index 591a5220..30ef8207 100644 --- a/deploy/charts/burrito/templates/server.yaml +++ b/deploy/charts/burrito/templates/server.yaml @@ -68,6 +68,9 @@ spec: subPath: burrito-ca.crt readOnly: true {{- end }} + {{- if .deployment.extraVolumeMounts }} + {{- toYaml .deployment.extraVolumeMounts | nindent 12 }} + {{- end }} {{- with .deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -106,6 +109,9 @@ spec: - key: ca.crt path: burrito-ca.crt {{- end }} + {{- if .deployment.extraVolumes }} + {{- toYaml .deployment.extraVolumes | nindent 8 }} + {{- end }} {{- if .service.enabled }} --- apiVersion: v1 diff --git a/deploy/charts/burrito/values.yaml b/deploy/charts/burrito/values.yaml index 78d512eb..e9394268 100644 --- a/deploy/charts/burrito/values.yaml +++ b/deploy/charts/burrito/values.yaml @@ -198,6 +198,10 @@ hermitcrab: value: "" port: 80 path: /livez + # -- Additional volumes + extraVolumes: {} + # -- Additional volume mounts + extraVolumeMounts: {} global: # -- Global metadata configuration @@ -233,6 +237,10 @@ global: ports: [] # -- Global environment variables envFrom: [] + # -- Additional volumes + extraVolumes: {} + # -- Additional volume mounts + extraVolumeMounts: {} # -- Global service configuration service: # -- Enable/Disable service creation for Burrito components @@ -276,6 +284,10 @@ controllers: envFrom: [] # -- Environment variables to pass to the Burrito controller container env: [] + # -- Additional volumes + extraVolumes: {} + # -- Additional volume mounts + extraVolumeMounts: {} service: # -- Enable/Disable service creation for the Burrito controller enabled: false @@ -319,6 +331,10 @@ server: - secretRef: name: burrito-webhook-secret optional: true + # -- Additional volumes + extraVolumes: {} + # -- Additional volume mounts + extraVolumeMounts: {} # -- Service configuration for the Burrito server service: ports: @@ -376,6 +392,10 @@ datastore: periodSeconds: 20 # -- Environment variables to pass to the Burrito datastore container envFrom: [] + # -- Additional volumes + extraVolumes: {} + # -- Additional volume mounts + extraVolumeMounts: {} # -- Service configuration for the Burrito datastore service: ports: