Browse Source

Added support for custom volume mounts for all 3 deployments

Django Cass 3 years ago
parent
commit
09bda1abc7

+ 8 - 0
deploy/charts/external-secrets/templates/cert-controller-deployment.yaml

@@ -76,6 +76,14 @@ spec:
           resources:
           resources:
             {{- toYaml . | nindent 12 }}
             {{- toYaml . | nindent 12 }}
           {{- end }}
           {{- end }}
+          {{- if .Values.certController.extraVolumeMounts }}
+          volumeMounts:
+          {{- toYaml .Values.certController.extraVolumeMounts | nindent 12 }}
+          {{- end }}
+      {{- if .Values.certController.extraVolumes }}
+      volumes:
+      {{ toYaml .Values.certController.extraVolumes | nindent 8 }}
+      {{- end }}
       {{- with .Values.certController.nodeSelector }}
       {{- with .Values.certController.nodeSelector }}
       nodeSelector:
       nodeSelector:
         {{- toYaml . | nindent 8 }}
         {{- toYaml . | nindent 8 }}

+ 8 - 0
deploy/charts/external-secrets/templates/deployment.yaml

@@ -89,6 +89,14 @@ spec:
           resources:
           resources:
             {{- toYaml . | nindent 12 }}
             {{- toYaml . | nindent 12 }}
           {{- end }}
           {{- end }}
+          {{- if .Values.webhook.extraVolumeMounts }}
+          volumeMounts:
+          {{- toYaml .Values.webhook.extraVolumeMounts | nindent 12 }}
+          {{- end }}
+      {{- if .Values.extraVolumes }}
+      volumes:
+      {{ toYaml .Values.extraVolumes | nindent 8 }}
+      {{- end }}
       {{- with .Values.nodeSelector }}
       {{- with .Values.nodeSelector }}
       nodeSelector:
       nodeSelector:
         {{- toYaml . | nindent 8 }}
         {{- toYaml . | nindent 8 }}

+ 6 - 0
deploy/charts/external-secrets/templates/webhook-deployment.yaml

@@ -83,10 +83,16 @@ spec:
           - name: certs
           - name: certs
             mountPath: {{ .Values.webhook.certDir }}
             mountPath: {{ .Values.webhook.certDir }}
             readOnly: true
             readOnly: true
+          {{- if .Values.webhook.extraVolumeMounts }}
+          {{- toYaml .Values.webhook.extraVolumeMounts | nindent 12 }}
+          {{- end }}
       volumes:
       volumes:
       - name: certs
       - name: certs
         secret:
         secret:
           secretName: {{ include "external-secrets.fullname" . }}-webhook
           secretName: {{ include "external-secrets.fullname" . }}-webhook
+      {{- if .Values.webhook.extraVolumes }}
+      {{ toYaml .Values.webhook.extraVolumes | nindent 8 }}
+      {{- end }}
       {{- with .Values.webhook.nodeSelector }}
       {{- with .Values.webhook.nodeSelector }}
       nodeSelector:
       nodeSelector:
         {{- toYaml . | nindent 8 }}
         {{- toYaml . | nindent 8 }}

+ 18 - 0
deploy/charts/external-secrets/values.yaml

@@ -67,6 +67,12 @@ extraEnv: []
 ## -- Map of extra arguments to pass to container.
 ## -- Map of extra arguments to pass to container.
 extraArgs: {}
 extraArgs: {}
 
 
+## -- Extra volumes to pass to pod.
+extraVolumes: []
+
+## -- Extra volumes to mount to the container.
+extraVolumeMounts: []
+
 # -- Annotations to add to Deployment
 # -- Annotations to add to Deployment
 deploymentAnnotations: {}
 deploymentAnnotations: {}
 
 
@@ -197,6 +203,12 @@ webhook:
     ## -- Map of extra arguments to pass to container.
     ## -- Map of extra arguments to pass to container.
   extraArgs: {}
   extraArgs: {}
 
 
+    ## -- Extra volumes to pass to pod.
+  extraVolumes: []
+
+    ## -- Extra volumes to mount to the container.
+  extraVolumeMounts: []
+
     # -- Annotations to add to Secret
     # -- Annotations to add to Secret
   secretAnnotations: {}
   secretAnnotations: {}
 
 
@@ -288,6 +300,12 @@ certController:
     ## -- Map of extra arguments to pass to container.
     ## -- Map of extra arguments to pass to container.
   extraArgs: {}
   extraArgs: {}
 
 
+    ## -- Extra volumes to pass to pod.
+  extraVolumes: []
+
+    ## -- Extra volumes to mount to the container.
+  extraVolumeMounts: []
+
     # -- Annotations to add to Deployment
     # -- Annotations to add to Deployment
   deploymentAnnotations: {}
   deploymentAnnotations: {}