-
-
Notifications
You must be signed in to change notification settings - Fork 96
Description
There is a need to connect to remote databases through an auth proxy for certain containerized workloads.
Since that is generally deployed as a "sidecar" instead of a standalone service to prevent unwanted external connections from hijacking auth we would like to add a section to the deployment.yaml template to process an additional container definition in the values.yaml. Some engineers do not wish to use the other auth methods due to high governance requirements around non-rotating auth in more secure networks.
I have considered writing my own helm chart, or not exporting from DBs in cloud environments, but nothing beats this capability for mature reliable system and application metrics.
On the plus side, the pattern is fairly simple and has been tested. Document an additionalContainers: section in the values file, then add the following to the helm/templates/deployment.yaml file.
{{- if .Values.additionalContainers}}
{{ tpl (toYaml .Values.additionalContainers | indent 8) .}}
{{- end }}
This will ensure that additional containers are rendered if present, but not disrupt any other deployments with new value requirements.