hashicorp / vault-k8s

First-class support for Vault and Kubernetes.
Mozilla Public License 2.0
784 stars 171 forks source link

Delimiter annotation #664

Open Diliz opened 2 months ago

Diliz commented 2 months ago

Rebased @cailtlinelfring annotations branch with delimiter annotations feature

rebased content of #226 instead of making my own (I was using leftdelim and rightdelim annotations in my version, nearly the same as @caitlinelfring version

hashicorp-cla-app[bot] commented 2 months ago

CLA assistant check
All committers have signed the CLA.

Diliz commented 2 months ago

fix https://github.com/hashicorp/vault-helm/issues/348 as well

Diliz commented 1 month ago

@tvoran @benashz How much time does it take for pull requests from outsiders to be checked and merged? (Just to know if this will be available soon or not on my side)

benashz commented 1 month ago

The original pull request talks a bit about handling templates included in a Helm chart. I wonder if we could recommend escaping the template instead of adding support for specifying alternate template delimiters? We are suggesting that approach here: https://github.com/hashicorp/vault-secrets-operator/issues/619#issuecomment-1984053146

Diliz commented 1 month ago

The original pull request talks a bit about handling templates included in a Helm chart. I wonder if we could recommend escaping the template instead of adding support for specifying alternate template delimiters? We are suggesting that approach here: hashicorp/vault-secrets-operator#619 (comment)

Humm, this helm approache is a workaround, not something to fix the real issue, currently it's a hassle to use go templating inside vault templates in kubernetes, if you want to make templating over templating over termplating, it becomes impossible to use if you don't know beforehand how many times the template will be templated, so escaping it is not a solution in this case.

Why not simply adding this delim annotations to make it convenient and be able to differentiate the default go templating from the one for the vault agent?

markush81 commented 2 weeks ago

Just stumbled over this and it is exactly what i need as well. Doing the escaping kinda gets easily a hell if you want to have parts replaced by helm template and parts by vault.

Any ETA for this PR?

Diliz commented 1 week ago

Just stumbled over this and it is exactly what i need as well. Doing the escaping kinda gets easily a hell if you want to have parts replaced by helm template and parts by vault.

Any ETA for this PR?

Waiting for @tvoran and @benashz comments and approval, I'm still following this case as I need it implemented as well 👍