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

fix: set authConfig before parsing annotations #457

Merged
merged 6 commits into from
Apr 13, 2023

Conversation

mrjoelkamp
Copy link
Contributor

@mrjoelkamp mrjoelkamp commented Mar 27, 2023

Summary

Set authConfig from annotations after setting it from agent attributes, so that the annotations take precedence.

Fixes

#456

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 27, 2023

CLA assistant check
All committers have signed the CLA.

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.

Thanks! Left a couple comments, and it would be good to get some unit tests for this specific behavior.

agent-inject/agent/annotations.go Outdated Show resolved Hide resolved
agent-inject/agent/annotations.go Show resolved Hide resolved
@mrjoelkamp
Copy link
Contributor Author

mrjoelkamp commented Apr 11, 2023

Thanks! Left a couple comments, and it would be good to get some unit tests for this specific behavior.

Thanks for the review! I added a unit test case for setting vault.hashicorp.com/auth-config-role in feat: add unit test for token_path

Confirmed that it fails prior to my changes and passes with these changes.

Running tool: /usr/local/bin/go test -timeout 30s -run ^TestAuthConfigAnnotations$ github.com/hashicorp/vault-k8s/agent-inject/agent

=== RUN   TestAuthConfigAnnotations
--- PASS: TestAuthConfigAnnotations (0.00s)
PASS
ok      github.com/hashicorp/vault-k8s/agent-inject/agent       0.471s

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.

Thanks for adding the test!

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