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

Flip default value for -write-secrets flag #127

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

tomhjp
Copy link
Contributor

@tomhjp tomhjp commented Jan 10, 2022

As per the upstream driver project, sending secret contents upstream for the driver to write to file needs to become the default. This gets rid of one of the hostPath volumes required in the default manifest, as the provider no longer needs to directly write to pods' mounts with this default.

@tomhjp tomhjp requested review from tvoran and imthaghost January 10, 2022 18:26
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.

👍 and a couple questions

Comment on lines +13 to +14
* Support for sending secret contents to driver for writing via `-write-secrets=false` [[GH-89](https://github.com/hashicorp/vault-csi-provider/pull/89)]
* **Note:** `-write-secrets=false` will become the default from v0.4.0 and require secrets-store-csi-driver v0.0.21+
Copy link
Member

Choose a reason for hiding this comment

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

Did the flag format change from -- to -? Or were these just typos?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I should have explained this change. With the standard lib "flag" package we're using, both forms work, but if you run with -help or --help, it prints the flags with a single dash, so I thought it would be better to be consistent on single dashes, which also matches better with the rest of our CLIs anyway.

@if [ "$(shell kubectl get pods -n csi -l app.kubernetes.io/name=vault-csi-provider -o json | jq -r '.items[0].spec.containers[0].args[] | match("--write_secrets=(true|false)").captures[0].string')" = "false" ]; then\
WRITE_SECRETS=true make e2e-set-write-secrets;\
else\
@if [ "$(shell kubectl get pods -n csi -l app.kubernetes.io/name=vault-csi-provider -o json | jq -r '.items[0].spec.containers[0].args[] | match("--write_secrets=(true|false)").captures[0].string')" = "true" ]; then\
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be single-dash format here too? i.e. match("-write_secrets...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I meant to push a commit addressing this before merging. Opened #129 to address.

@tomhjp tomhjp merged commit 8ed3104 into master Jan 11, 2022
@tomhjp tomhjp deleted the flip-write-secrets-default branch January 11, 2022 11:04
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.

2 participants