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 CLI options from VSO_ environment variables #551

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

tvoran
Copy link
Member

@tvoran tvoran commented Jan 17, 2024

Adds support for setting some of the CLI options from environment variables, including:

  • VSO_OUTPUT_FORMAT
  • VSO_CLIENT_CACHE_SIZE
  • VSO_CLIENT_CACHE_PERSISTENCE_MODEL
  • VSO_MAX_CONCURRENT_RECONCILES

If both a command-line arg and environment variable are set for the same option, the environment variable takes precedence.

Also mentions the environment variables in the CLI flag help output.

Fixes #533

Adds support for setting some of the CLI options from environment
variables, prefixed with VSO_ (e.g. VSO_OUTPUT_FORMAT).
@tvoran tvoran added this to the v0.5.0 milestone Jan 17, 2024
@tvoran tvoran requested a review from a team as a code owner January 17, 2024 22:44
Copy link
Collaborator

@benashz benashz left a comment

Choose a reason for hiding this comment

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

Only a few suggestions to consider, otherwise looks great. I guess we will need to update the main VSO docs for these new env vars?

internal/options/env.go Outdated Show resolved Hide resolved
internal/options/env.go Outdated Show resolved Hide resolved
main.go Show resolved Hide resolved
@tvoran
Copy link
Member Author

tvoran commented Jan 19, 2024

I guess we will need to update the main VSO docs for these new env vars?

Yep, absolutely, especially as it pertains to OperatorHub/OLM setups.

@benashz benashz self-requested a review January 19, 2024 15:17
Copy link
Collaborator

@benashz benashz left a comment

Choose a reason for hiding this comment

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

LGTM!

@tvoran
Copy link
Member Author

tvoran commented Jan 19, 2024

Thanks!

@tvoran tvoran merged commit 0fd4c3b into main Jan 19, 2024
39 checks passed
@tvoran tvoran deleted the VAULT-20370/set-options-from-env branch January 19, 2024 18:19
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.

OLM installation doesn't support setting flags for the operator
2 participants