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

Added support to configure default vault namespace on the agent config #752

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bradfordwagner
Copy link

follow up to: hashicorp/vault-k8s#345

@hashicorp-cla
Copy link

hashicorp-cla commented Jul 6, 2022

CLA assistant check
All committers have signed the CLA.

@bradfordwagner bradfordwagner force-pushed the feature/webhook-default-namespace branch from d13f951 to f0f762e Compare July 6, 2022 21:00
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.

This looks like it's on the right track, though I'd like to also see tests in test/unit/injector-deployment.bats for the new option.

It also occurs to me that this PR may not strictly be necessary since the env var can already be set via the existing injector.extraEnvironmentVars option. For example:

# values.yaml
injector:
  extraEnvironmentVars:
    AGENT_INJECT_VAULT_NAMESPACE: "admin"

Or on the cli:

helm install vault hashicorp/vault \
  --set injector.extraEnvironmentVars.AGENT_INJECT_VAULT_NAMESPACE="admin" 

Comment on lines +121 to +122
- name: AGENT_INJECT_VAULT_NAMESPACE
value: "{{ .Values.injector.agentDefaults.namespace }}"
Copy link
Member

Choose a reason for hiding this comment

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

I think this var should only be set if .Values.injector.agentDefaults.namespace isn't empty, similar to how AGENT_INJECT_TEMPLATE_STATIC_SECRET_RENDER_INTERVAL is handled above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants