-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 fix: preserve existing flags when applying metrics patch #3937
馃悰 fix: preserve existing flags when applying metrics patch #3937
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1855c9e
to
12de7da
Compare
12de7da
to
92d2bda
Compare
This solves it for the default set of flags that we scaffold into |
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.
By the way, typo in file name:
s/enable_matrics_patch.go/enable_metrics_patch.go/
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 saw this one as well. I was avoiding have issues to cherry-pick but lets fix it.
The correct way is keep the go file name as the name of the file that is scaffolded.
Done 馃憤
92d2bda
to
925bc6f
Compare
Hi @joelanford Regards: #3937 (comment) |
925bc6f
to
bd22646
Compare
933fd41
to
6c3321b
Compare
@@ -76,7 +76,8 @@ func main() { | |||
var probeAddr string | |||
var secureMetrics bool | |||
var enableHTTP2 bool | |||
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.") | |||
flag.StringVar(&metricsAddr, "metrics-bind-address", ":0", "The address the metric endpoint binds to. "+ |
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 think ":0"
means "bind to any open port", whereas "0"
means "don't start the metrics server", right?
flag.StringVar(&metricsAddr, "metrics-bind-address", ":0", "The address the metric endpoint binds to. "+ | |
flag.StringVar(&metricsAddr, "metrics-bind-address", "0", "The address the metric endpoint binds to. "+ |
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.
That works as well. But we can change no problem at all.
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.
One more fix, I think. Other than that, lgtm.
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments. More info: kubernetes-sigs#3934
6c3321b
to
d05aae5
Compare
馃悰 (cherry-pick #3937) - fix: preserve existing flags when applying metrics patch
Ensure that enabling the manager_metrics_patch.yaml in config/default/kustomization.yaml does not overwrite existing arguments in config/manager/manager.yaml. The patch now appends the --metrics-bind-address argument without replacing other arguments.
Closes: #3934