Run only init container for the kubernetes job

Hi,
I have a job that only needs init container for the job to complete and I could not see any documentation on vault to perform such action. I did with agent-inject: “true” but with this, the side-car never terminates gracefully so pod never goes to completed.

Job gets completed fine but if anyone has idea on either gracefully exiting sidecar container or just running init container for k8s jobs, that’d be super helpful!

Thank you so much!

problem resolved, solution was in the vault documentation all along for anyone who’s got similar issues and didn’t bother to look further down the line for annotations:
I did the following:

vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-pre-populate-only: "true"
1 Like