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

Operator metrics #602

Merged
merged 1 commit into from
Feb 16, 2021
Merged

Operator metrics #602

merged 1 commit into from
Feb 16, 2021

Conversation

ansd
Copy link
Member

@ansd ansd commented Feb 15, 2021

Remove the following patch files:

  • manager_auth_proxy_patch.yaml: As of now, the operator metrics do not contain sensitive information. Therefore, there is no need to use basic auth and a proxy to scrape the metrics.
  • manager_disable_metrics_patch.yaml: Up until now metrics were enabled in make targets generate-installation-manifest (the production YAML), deploy-kind, deploy-dev. This file got only applied when running deploy-manager. However, we want to expose metrics by default. There is no need to disable metrics in make target deploy-manager.
  • manager_prometheus_metrics_patch.yaml: Since we enable operator metrics by default, we put the port spec directly into config/manager/manager.yaml. I left out the annotation prometheus.io/scrape: 'true' on purpose since one should use monitors when using the Prometheus operator instead of relying on the annotation (see Update manifests to latest version of Prometheus Operator prometheus-operator/kube-prometheus#16 (comment)).

Add (HTTP only) examples how to scrape the operator metrics.

This PR does not change any behaviour. Before and after this PR, port 9782 is exposed.
However, this PR adds a named metrics port to the manager deployment YAML such that a PodMonitor can scrape the metrics without using the deprecated targetPort.

The operator metrics default port is 9782.
Enable operator metrics by default (which was already the case before
this commit.)

As of now, the operator metrics do not contain sensitive information.
Therefore, there is no need to use basic auth and a proxy to scrape the
metrics. Hence, remove the auth proxy patch file.

Include the metrics port in the mangager deployment YAML so that we can
create PodMonitors to point to the metrics port.
Add examples how to scrape the operator metrics.
@ansd ansd merged commit b784c3f into main Feb 16, 2021
@ansd ansd deleted the metrics-operator branch February 16, 2021 13:59
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