-
Notifications
You must be signed in to change notification settings - Fork 101
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
Metrics configuration #(1/4) #525
Conversation
@kuritka this is a bit confusing. 9090 is a default p8s server port. 8080 and MetricsAddr was pretty self explanatory term. |
Ok, will change to 8080. What do you mean by MetricsAddr ? |
@kuritka you have it now as Prometheus.Port (sounds like server port), MetricsAddr defines metrics endpoint better IMO |
bf4a0c5
to
f3e9075
Compare
ad6e895
to
92f5a43
Compare
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.
LGTM
Port: 9443, | ||
LeaderElection: enableLeaderElection, | ||
LeaderElection: false, |
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.
hmm, we never tested it, but what if somebody would like to try to execute multiple k8gb controllers with leader election mechanism in the future? currently it is optional but here it is becoming hardcoded.
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.
enableLeaderElection was accessible through an argument of executable. Making such functionality available would mean passing the argument to the controller pod. Till now it was always false anyway.
What we can do is create an issue, expose an environment variable and test.
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.
@kuritka ok let's log the issue then
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.
opened #526
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.
even more, I think it requires to have locking to be implemented.
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.
Related to #124 I created a MetricsAddress field. The default port value is “0.0.0.0:8080" and defines where Prometheus metrics endpoint is listening. (see: https://docs.openshift.com/container-platform/4.1/applications/operator_sdk/osdk-monitoring-prometheus.html#osdk-monitoring-prometheus-metrics-helper_osdk-monitoring-prometheus) I also removed flag.StringVar `"metrics-addr", ":8080”,` from `main.go` as moving inputs into depresolver and also, removed enableLeaderElection and overall flags completely. Signed-off-by: kuritka <[email protected]>
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.
lgtm
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.
@kuritka LGTM
Related to #124
I created a MetricsAddress field. The default value is “0.0.0.0:8080" and defines where Prometheus metrics endpoint is listening. (see: https://docs.openshift.com/container-platform/4.1/applications/operator_sdk/osdk-monitoring-prometheus.html#osdk-monitoring-prometheus-metrics-helper_osdk-monitoring-prometheus)
I also removed flag.StringVar
"metrics-addr", ":8080”,
frommain.go
as moving inputs into depresolver and also, removedenableLeaderElection
and overall flags completely.Signed-off-by: kuritka [email protected]