Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unset values in secret-env if they are unset in helm #30

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sauyon
Copy link
Contributor

@sauyon sauyon commented Aug 9, 2023

This solves an issue where even if helm values are set to false, secret values will be preserved.

This is untested as I'm not exactly sure of how to test this, and shouldn't be merged.

/cc @bojiang

@@ -15,28 +15,20 @@ stringData:
DOCKER_REGISTRY_SERVER: {{ .Values.dockerRegistry.server | quote }}
DOCKER_REGISTRY_IN_CLUSTER_SERVER: {{ .Values.dockerRegistry.inClusterServer | quote }}
DOCKER_REGISTRY_USERNAME: {{ .Values.dockerRegistry.username | quote }}
{{- if not .Values.dockerRegistry.passwordExistingSecretName }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you delete this, the passwordExistingSecretName will not take effect.

{{- if .Values.dockerRegistry.passwordExistingSecretName }}
- name: DOCKER_REGISTRY_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.dockerRegistry.passwordExistingSecretName | quote }}
key: {{ .Values.dockerRegistry.passwordExistingSecretKey | quote }}
{{- end }}

sauyon and others added 2 commits August 30, 2023 11:49
This solves an issue where even if helm values are set to false, secret values will be preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants