Professional Documents
Culture Documents
Integrating Vault To Helm-Chart
Integrating Vault To Helm-Chart
Create a vault template file in the templates folder. Below sample can be used as _vault.tpl
Add required annotations and your required commands with vault secret command added to your statefulset configurations:
template:
metadata:
annotations:
{{- include "sync.vaultAgentBasics" . | nindent 8 }}
{{- include "commons.vaultPrePopulateOnly" . | nindent 8 }}
{{- include "sync.vaultAgentSecretsLoad" . | nindent 8 }}
{{- include "sync.vaultAgentRoleName" . | nindent 8 }}
----------
command: ["/bin/bash"]
args: ["-c", "source /vault/secrets/variables; /bin/bash /docker-
entrypoint.sh; python web2py.py -a ua123 -i 0.0.0.0 -p 8001"]
appName: sync
environment: "dev"
team: "sms"
Create your secrets to your defined path from vault template file
Access > Kubernetes > view configurations > roles > create role
Then finally run helm upgrade to your application to deploy new changes.
cat /vault/secrets/variables