Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag and annotation to override default template #242

Merged
merged 8 commits into from
Apr 8, 2021

Conversation

jasonodonnell
Copy link
Contributor

@jasonodonnell jasonodonnell commented Apr 2, 2021

The current default template (a map) is not easy to consume by applications due to the weird formatting. I've added a global default via flag/env (AGENT_INJECT_DEFAULT_TEMPLATE), as well as an annotation (agent-inject-default-template) to override this to either be map or json. I'm keeping the default as map so this is backwards compatible in case any application is actually using that style of value.

Once merged we can expose the global in Vault Helm.

Fixes #116.

@jasonodonnell jasonodonnell added the enhancement New feature or request label Apr 2, 2021
@jasonodonnell jasonodonnell requested review from tvoran and tomhjp April 2, 2021 15:14
Copy link
Member

@tvoran tvoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Worked for me when I tested it. Just a few notes.

agent-inject/agent/container_sidecar_test.go Outdated Show resolved Hide resolved
agent-inject/agent/container_sidecar_test.go Outdated Show resolved Hide resolved
subcommand/injector/flags.go Outdated Show resolved Hide resolved
@jasonodonnell jasonodonnell merged commit b62d034 into master Apr 8, 2021
@jasonodonnell jasonodonnell deleted the json-template branch April 8, 2021 14:11
RemcoBuddelmeijer pushed a commit to RemcoBuddelmeijer/vault-k8s that referenced this pull request Feb 22, 2022
* Add flag/annotation override for default template

* Update deployment

* Fix test

* Clean up test structs

* Update per review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Allow altering consul template for default secret output
2 participants