-
Notifications
You must be signed in to change notification settings - Fork 457
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
Add flags to override hardcoded images #449
Conversation
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
main.go
Outdated
pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") | ||
pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, | ||
"Enable leader election for controller manager. "+ | ||
"Enabling this will ensure there is only one active controller manager.") | ||
pflag.StringVar(&collectorImage, "collector-image", "", "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this have a default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default images are hardcoded in the config package
o.collectorImage = fmt.Sprintf("otel/opentelemetry-collector:%s", o.version.OpenTelemetryCollector) |
The config package hardcodes image name and sets the tag based on the version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made some changes and moved the logic to main. It looks better now and cleaner.
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Fixed failing tests. I had to add a default (dummy) image names to config used in the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VineethReddy02, would you mind reviewing as well?
@jpkrohling can we get this in before 0.36.0 goes out? |
* Add flags to override hardcoded images Signed-off-by: Pavol Loffay <[email protected]> * Fix typos Signed-off-by: Pavol Loffay <[email protected]> * Remove version from config Signed-off-by: Pavol Loffay <[email protected]> * Fix tests Signed-off-by: Pavol Loffay <[email protected]>
* Add flags to override hardcoded images Signed-off-by: Pavol Loffay <[email protected]> * Fix typos Signed-off-by: Pavol Loffay <[email protected]> * Remove version from config Signed-off-by: Pavol Loffay <[email protected]> * Fix tests Signed-off-by: Pavol Loffay <[email protected]>
Resolves #447
Signed-off-by: Pavol Loffay [email protected]