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

Parse flags before using them in config #662

Merged

Conversation

rubenvp8510
Copy link
Contributor

Signed-off-by: Ruben Vargas ruben.vp8510@gmail.com

pflag.Parse() Should be called before we use the arguments to initialize the config structure. If not, the variables won't contain the argument values, and the operator won't honor the argument values.

Also, removed the config flags, as this is not used anymore since this PR #449 migrated the flags to main.go

Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
@rubenvp8510 rubenvp8510 requested review from a team and bogdandrutu January 12, 2022 06:05
@pavolloffay pavolloffay changed the title Parse arguments before using it in config Parse flags before using them in config Jan 12, 2022
Copy link
Member

@pavolloffay pavolloffay left a comment

Choose a reason for hiding this comment

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

LGTM,

it would be great to have a test, but that would either require moving parts of the main to a separate package or writing a custom e2e test.

@VineethReddy02 VineethReddy02 merged commit 7101339 into open-telemetry:main Jan 12, 2022
ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this pull request May 1, 2024
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