HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to manage Env Variables / Configs on a Helm Chart + Github Actions + Github Secrets

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
actionschartgithubmanagesecretsconfigshelmvariableshowenv

Problem

I have a Rest API in Python that has several Configuration variables that are setup at startup time.

This variables are read from the environment variables of the host machine.

Our production environmant is on a kubernetes cluster that is deployed with github actions and a helm chart.

The problem I have is that whenever a new config variable is added. I have to add it in 3 places.

  • On the actual python application code



  • On the helm chart's values.yaml



  • On the github secrets of the repo so that during the deployment it sets the values.yaml with the value of the secret.



How to manage it and make this process a bit less error prone? Since now it's very likely that somebody forgest to add the new config on any of the above 3 places and break the deploy pipeline.

Solution

The process itself looks fine to me, what I would do is:

  • Add a test in the last step that runs helm template on a few targets that may get this parameter, to verify it is not failing.



  • Add the parameter in a way that will not break the pipeline if it is missing, or put a default in the code that will not cause damage.

Context

StackExchange DevOps Q#15511, answer score: 1

Revisions (0)

No revisions yet.