From 85bba5adf7bc356390b0f5f6852148a32c2c50b6 Mon Sep 17 00:00:00 2001 From: Gerrit Gogel Date: Wed, 8 Jan 2025 17:07:22 +0100 Subject: [PATCH] feat: Mount path /tmp as emptyDir volume (#3218) Co-authored-by: Kent Rancourt --- charts/kargo/templates/controller/deployment.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/charts/kargo/templates/controller/deployment.yaml b/charts/kargo/templates/controller/deployment.yaml index 88631e9a1..095974588 100644 --- a/charts/kargo/templates/controller/deployment.yaml +++ b/charts/kargo/templates/controller/deployment.yaml @@ -79,8 +79,9 @@ spec: {{- with (concat .Values.global.envFrom .Values.controller.envFrom) }} {{- toYaml . | nindent 8 }} {{- end }} - {{- if or .Values.kubeconfigSecrets.kargo .Values.kubeconfigSecrets.argocd .Values.controller.gitClient.signingKeySecret.name .Values.controller.cabundle.configMapName .Values.controller.cabundle.secretName }} volumeMounts: + - mountPath: /tmp + name: tmpData {{- if or .Values.kubeconfigSecrets.kargo .Values.kubeconfigSecrets.argocd }} - mountPath: /etc/kargo/kubeconfigs name: kubeconfigs @@ -95,13 +96,13 @@ spec: - mountPath: /etc/ssl/certs name: certs {{- end }} - {{- end }} {{- with .Values.controller.securityContext | default .Values.global.securityContext }} securityContext: {{- toYaml . | nindent 10 }} {{- end }} resources: {{- toYaml .Values.controller.resources | nindent 10 }} + {{- if or .Values.controller.cabundle.configMapName .Values.controller.cabundle.secretName }} initContainers: - name: parse-cabundle @@ -127,8 +128,9 @@ spec: - name: certs mountPath: /tmp/target {{- end }} - {{- if or .Values.kubeconfigSecrets.kargo .Values.kubeconfigSecrets.argocd .Values.controller.gitClient.signingKeySecret.name .Values.controller.cabundle.configMapName .Values.controller.cabundle.secretName }} volumes: + - name: tmpData + emptyDir: {} {{- if or .Values.kubeconfigSecrets.kargo .Values.kubeconfigSecrets.argocd }} - name: kubeconfigs projected: @@ -169,7 +171,6 @@ spec: secretName: {{ .Values.controller.gitClient.signingKeySecret.name }} defaultMode: 0644 {{- end }} - {{- end }} {{- with .Values.controller.nodeSelector | default .Values.global.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }}