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

Storing in values.yaml in GitHub #24

Open
mergwyn opened this issue Sep 19, 2024 · 3 comments
Open

Storing in values.yaml in GitHub #24

mergwyn opened this issue Sep 19, 2024 · 3 comments

Comments

@mergwyn
Copy link

mergwyn commented Sep 19, 2024

Hi, sorry if this is a basic question - I am hoping to use this chart with argocd but I cannot work out whether it is safe to commit my clusterid to GitHub in plain text in my values file. If not, I’ll try and work up a PR to allow it to be stored in a secret.

@jongarner
Copy link
Collaborator

Hi, cluster_id is used to map the cluster to your CloudCasa account so its best to keep it private. At the moment the chart doesn't support reading the value from a secret.

One option is to provide the helm value cluster_id in ArgoCD helm parameters, this way it can be read from environment vars/vault at runtime.

@mergwyn
Copy link
Author

mergwyn commented Sep 19, 2024

I'll give this a go when I get chance. My thinking is that I will add values.secretName and then in the template will conditionally set AMDS_CLUSTER_ID using valueFrom and secretKeyRef if secretName is defined, otherwise will set from cluster_id as currently. Should be a non-breaking change if I do it correctly!

@mergwyn
Copy link
Author

mergwyn commented Sep 19, 2024

This is what I had in mind:

         - name: AMDS_CLUSTER_ID
            {{ if .Values.secretName }}
            valueFrom:
              secretKeyRef:
               key: cluster_id
               name: {{ .Values.secretName }}
            {{ else }}
            value: {{ .Values.cluster_id }}
            {{ end }}

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

No branches or pull requests

2 participants