diff --git a/charts/nodepool/templates/builder/statefulset.yaml b/charts/nodepool/templates/builder/statefulset.yaml index edad8d7..0671b61 100644 --- a/charts/nodepool/templates/builder/statefulset.yaml +++ b/charts/nodepool/templates/builder/statefulset.yaml @@ -40,7 +40,7 @@ spec: volumes: - name: nodepool-config secret: - secretName: {{ include "nodepool.fullname" . }} + secretName: {{ (empty .Values.config.secret) | ternary (include "nodepool.fullname" .) .Values.config.secret }} - name: nodepool-logs emptyDir: {} - name: dev diff --git a/charts/nodepool/templates/launcher/deployment.yaml b/charts/nodepool/templates/launcher/deployment.yaml index 5bd1b69..3a22048 100644 --- a/charts/nodepool/templates/launcher/deployment.yaml +++ b/charts/nodepool/templates/launcher/deployment.yaml @@ -31,7 +31,7 @@ spec: volumes: - name: nodepool-config secret: - secretName: {{ include "nodepool.fullname" . }} + secretName: {{ (empty .Values.config.secret) | ternary (include "nodepool.fullname" .) .Values.config.secret }} {{- with .Values.tolerations }} tolerations: {{ toYaml . | indent 8 }} diff --git a/charts/nodepool/templates/secret.yaml b/charts/nodepool/templates/secret.yaml index e55cf57..aca2054 100644 --- a/charts/nodepool/templates/secret.yaml +++ b/charts/nodepool/templates/secret.yaml @@ -1,4 +1,5 @@ --- +{{ if not .Values.config.secret }} apiVersion: v1 kind: Secret metadata: @@ -11,4 +12,5 @@ stringData: {{ toYaml .Values.config | indent 4 }} clouds.yaml: | clouds: -{{ toYaml .Values.clouds | indent 6 }} \ No newline at end of file +{{ toYaml .Values.clouds | indent 6 }} +{{ end }} \ No newline at end of file