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
Decouple metrics endpoint from the aggregated server #829
Decouple metrics endpoint from the aggregated server #829
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fpetkovski The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
34cf455
to
0bccdc0
Compare
c8dc5cf
to
be468a2
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.
The generic apiserver is still registering the metrics handler in https://github.com/kubernetes-sigs/metrics-server/blob/master/pkg/server/config.go#L73 and serving metrics. This should be changed if we want to completely decouple metrics from the generic apiserver.
a3ca9cd
to
6cf9349
Compare
6cf9349
to
8309a2b
Compare
Where have we got with this PR? I'm waiting for this to drop to update the Helm chart with a |
81d4ce6
to
1c57ea2
Compare
@serathius @dgrisonnet could you ptal again? |
1c57ea2
to
e81409a
Compare
pkg/server/server.go
Outdated
s.addMetricsServer(ctx, &g) | ||
} | ||
|
||
fmt.Println("Running group") |
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.
Please use proper logging library
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.
Ah, I don't even thing this is necessary, I'll just remove it.
e81409a
to
5a49efd
Compare
@@ -62,6 +63,7 @@ func (o *Options) Flags() (fs flag.NamedFlagSets) { | |||
msfs.DurationVar(&o.MetricResolution, "metric-resolution", o.MetricResolution, "The resolution at which metrics-server will retain metrics, must set value at least 10s.") | |||
msfs.BoolVar(&o.ShowVersion, "version", false, "Show version") | |||
msfs.StringVar(&o.Kubeconfig, "kubeconfig", o.Kubeconfig, "The path to the kubeconfig used to connect to the Kubernetes API server and the Kubelets (defaults to in-cluster config)") | |||
msfs.StringVar(&o.MetricsAddress, "metrics-address", o.MetricsAddress, "The address used for exposing prometheus metrics (optional)") |
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.
msfs.StringVar(&o.MetricsAddress, "metrics-address", o.MetricsAddress, "The address used for exposing prometheus metrics (optional)") | |
msfs.StringVar(&o.MetricsAddress, "metrics-address", o.MetricsAddress, "Separate insecure address used for exposing prometheus metrics (optional)") |
@dgrisonnet Question, based on the original issue you just need to disable apiserver authorization on /metrics endpoint. Why not just use |
I missed this flag when looking into this issue 😕, but yeah that will solve the problem if we disable authorization on the /metrics endpoint. Thank you for chiming in @serathius and sorry @fpetkovski. Let me know if you think there is still a use case for this PR, otherwise, I think we can close it and use the flag to solve the initial problem. |
Sounds good, looks like we can close this PR |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #801