Conventions for k8s and chart variables
Project variables are great (and getting better), but they're not automatically passed through to code running in production under Kubernetes with Auto Deploy, for example. We should come up with some conventions for passing variables to Kubernetes secrets and Helm chart configuration. We likely don't want to pass all project variables automatically to k8s and helm, and we certainly don't want to pass all environment variables as these contain other content.
One suggestion is to take anything with the prefix of
k8s_ and store those variables (with the prefix stripped) as Kubernetes secrets. Likewise, anything with
chart_ could be passed to the
helm upgrade command.
With environment-specific variables (#27722), this will be more valuable. In the absence of that, we could even map
k8s_production_* automatically to the production environment, for example.
Links / references
- Inspiration: https://medium.com/opszero/deploying-kubernetes-secrets-with-circleci-23c5496a1027
(Write the start of the documentation of this feature here, include:
- Why should someone use it; what's the underlying problem.
- What is the solution.
- How does someone use this
During implementation, this can then be copied and used as a starter for the documentation.)