Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Support validation of ".spec.valuesFrom" #25

Open
jozala opened this issue Jan 31, 2020 · 4 comments
Open

Support validation of ".spec.valuesFrom" #25

jozala opened this issue Jan 31, 2020 · 4 comments

Comments

@jozala
Copy link
Contributor

jozala commented Jan 31, 2020

I would like to use hrval-action, but in my use case I am using ".spec.valuesFrom" to add values from Kubernetes secrets to application configuration. These values passed with "valuesFrom" are required in Helm chart so validation fails.

What I would propose is to have a separate directory with ConfigMaps and Secrets in the deployment repository where hrval-action would look for ConfigMaps and Secrets specified with ".spec.ValuesFrom". In my case - I will push Secrets with fake values and flux.weave.works/ignore set to "true" to this directory.

Additional steps would be:

  1. Read valuesFrom from HelmRelease
  2. Find files fitting valuesFrom configmap or secret
  3. Read values from file found in point 2 and move it to temp file
  4. Add multiple -f tempfile to helm template command

What do you think about it?

Bonus question:
Is other language then Bash acceptable for this project? I can see Docker image is using Go.

@jozala
Copy link
Contributor Author

jozala commented Feb 11, 2020

@stefanprodan What's your opinion on that? I may try to implement it if you think it makes sense for the project.

@stefanprodan
Copy link
Owner

Yes I think it makes sense 👍

As for the language, I think you could write GH actions in Go but I didn't had time to see what options are there.

@renanqts
Copy link

Would be nice parser chartFileRef and use if exist. PR #32 covers it.

@jozala
Copy link
Contributor Author

jozala commented Dec 22, 2020

I have finally implemented this feature and created pull request #57 .
I hope it is still OK to use Go for this implementation as discussed earlier. I am not a Go developer and any feedback about the code is highly appreciated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants