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 Agent and Proxy env var handling #24790

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

VioletHynes
Copy link
Contributor

@VioletHynes VioletHynes commented Jan 10, 2024

I spotted this as part of sustaining, and heavily inspired by #16701

Fixes #14316

tl;dr: Agent and Proxy don't read environment variables properly, it just assumes it's "true" if any string is present, which makes it impossible to set a default-true config to false. I added tests that failed before this fix.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Jan 10, 2024
Copy link

Build Results:
All builds succeeded! ✅

Copy link

CI Results:
All Go tests succeeded! ✅

command/agent.go Outdated Show resolved Hide resolved
command/agent_test.go Outdated Show resolved Hide resolved
Copy link

@peteski22 peteski22 left a comment

Choose a reason for hiding this comment

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

Nice one!

I added a couple of comments which 'up to you' 😄 and also I think you need godocs for the new tests, but I'll approve so you can merge it in once you made CI happy.

@VioletHynes VioletHynes merged commit 9e62680 into main Jan 11, 2024
110 checks passed
@VioletHynes VioletHynes deleted the violethynes/fix-agent-proxy-env-var-handling branch January 11, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vault Agent ignores VAULT_SKIP_VERIFY environment variable
2 participants