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

Set Vault Namespace on underlying rawClient if it has a non-empty value #1412

Merged

Conversation

wmene
Copy link
Contributor

@wmene wmene commented Sep 9, 2021

Q A
Bug fix? yes
New feature? no
API breaks? no
Deprecations? no
Related tickets fixes #917 , completes #1361
License Apache 2.0

What's in this PR?

This completes the work in PR #1361 . This enables mutation of non-pod resources like secrets. It sets the vault namespace on the underlying rawClient used in pkg/sdk/vault/client.go

Why?

Even though PR #1361 parses out vault-namespace from a resource's annotation, it does not set that value on the underlying vault client.

Additional context

As described in #917, this is not an issue for pods that set the VAULT_NAMESPACE environment variable. Setting this environment variable does get picked up by the client, see https://github.com/hashicorp/vault/blob/v1.8.2/api/client.go#L484

Checklist

@CLAassistant
Copy link

CLAassistant commented Sep 9, 2021

CLA assistant check
All committers have signed the CLA.

@bonifaido bonifaido self-assigned this Sep 9, 2021
@bonifaido
Copy link
Member

bonifaido commented Sep 9, 2021

We have some compile errors now. Could you please have a look @wmene ?

@wmene
Copy link
Contributor Author

wmene commented Sep 9, 2021

@bonifaido Whoops, sorry about that. First time working with golang, but things should be ok now

Copy link
Member

@bonifaido bonifaido left a comment

Choose a reason for hiding this comment

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

LGTM, and thank you @wmene !

@bonifaido bonifaido merged commit 6b43b75 into bank-vaults:master Sep 10, 2021
@wmene
Copy link
Contributor Author

wmene commented Sep 13, 2021

@bonifaido Thanks for looking! It looks like I just missed the 1.14.0 release. Any idea about when 1.14.1 or later will come out? 😀

@bonifaido
Copy link
Member

I think we wait for a few more items usually 1 or 2 weeks :)

@bonifaido
Copy link
Member

Releasing in 1 hour from now. 👍

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.

Webhook unable to mutate Secret when using external Vault with Vault-namespaces
3 participants