-
Notifications
You must be signed in to change notification settings - Fork 6
HYPERFLEET-1410 - feat: expose operator metrics, health probes, and ServiceMonitor #9
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
base: main
Are you sure you want to change the base?
Changes from all commits
62ada4e
d830c31
bb97546
458a48d
e1715f9
4c2fb9c
47b3389
9da83b8
ded2a4f
68b4da9
165d1b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| # Prometheus Monitor Service (Metrics) | ||
| # Scrapes the operator's plain-HTTP metrics endpoint on :9090, per the HyperFleet | ||
| # metrics standard (same exposition as the API, Sentinel and Adapter components). | ||
| apiVersion: monitoring.coreos.com/v1 | ||
| kind: ServiceMonitor | ||
| metadata: | ||
|
|
@@ -11,16 +13,14 @@ metadata: | |
| spec: | ||
| endpoints: | ||
| - path: /metrics | ||
| port: https # Ensure this is the name of the port that exposes HTTPS metrics | ||
| scheme: https | ||
| bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
| tlsConfig: | ||
| # TODO(user): The option insecureSkipVerify: true is not recommended for production since it disables | ||
| # certificate verification, exposing the system to potential man-in-the-middle attacks. | ||
| # For production environments, it is recommended to use cert-manager for automatic TLS certificate management. | ||
| # To apply this configuration, enable cert-manager and use the patch located at config/prometheus/servicemonitor_tls_patch.yaml, | ||
| # which securely references the certificate from the 'metrics-server-cert' secret. | ||
| insecureSkipVerify: true | ||
| port: metrics # matches the metrics Service port name | ||
| # Hardcoded to the HyperFleet metrics standard's plain-HTTP default | ||
| # (--metrics-secure=false). If the operator is run with --metrics-secure=true, | ||
| # this scrape will fail: the endpoint requires HTTPS + authn/authz and this | ||
| # manifest is not updated automatically. Configure scheme/tlsConfig/bearerToken | ||
| # here yourself in that case (see config/prometheus/monitor_tls_patch.yaml). | ||
| scheme: http | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. even with --metrics-secure=true, the ServiceMonitor still uses scheme: http. was that intentional?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not intentional — real gap. --metrics-secure=true switches to HTTPS+authn/authz, but both ServiceMonitors (static and runtime-created) hardcode scheme: http. Documented the limitation for now rather than building full dynamic TLS support; opening a follow-up story to address it properly. |
||
| interval: 30s | ||
| selector: | ||
| matchLabels: | ||
| control-plane: controller-manager | ||
|
|
||
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 you need to plumb these args through on the tekton pipeline, otherwise they just remain on 0.0.0-dev and unknown