We are trying to inject secrets into our helm charts values.yaml using agent injector. Can you point me to some examples on what annotations need to be used in helm charts to inject a password
The typical workflow is to use the helm chart’s pod annotation fields to add templating logic that enables the agent injector to inject secrets into the application at run time. This of course relies on the helm chart exposing that field.
Here’s a very hand-wavy example of how I would do it if trying to inject a secret through the postgresql helm chart:
global:
primary:
podAnnotations: |
vault.hashicorp.com/agent-inject: 'true'
vault.hashicorp.com/role: 'role1'
vault.hashicorp.com/agent-inject-secret-config: 'kvv1/secret'
I do need to add the vault details as well in the chart?
something on these lines:
Vault:
enabled: true
address:
authpath:
secretPath:
You can refer to this documentation for more information regarding this topic: