Skip to content

OCPBUGS-58102: Expose ExternalDNS operand metrics via kube-rbac-proxy sidecar#371

Open
Thealisyed wants to merge 1 commit intoopenshift:mainfrom
Thealisyed:fix/operand-metrics-exposure
Open

OCPBUGS-58102: Expose ExternalDNS operand metrics via kube-rbac-proxy sidecar#371
Thealisyed wants to merge 1 commit intoopenshift:mainfrom
Thealisyed:fix/operand-metrics-exposure

Conversation

@Thealisyed
Copy link
Copy Markdown
Contributor

The ExternalDNS operand binds its Prometheus metrics to localhost (127.0.0.1:7979), making them invisible to the cluster monitoring stack. This adds a kube-rbac-proxy sidecar to proxy metrics over HTTPS, along with a Service and ServiceMonitor for Prometheus discovery.

  • Add --kube-rbac-proxy-image CLI flag and operator config plumbing
  • Inject one kube-rbac-proxy sidecar per zone container (ports 8443+) so multi-zone deployments expose all metrics
  • Create metrics Service with serving-cert annotation for auto TLS
  • Create ServiceMonitor with scheme: https, bearerTokenFile, and tlsConfig for authenticated Prometheus scraping
  • Add tokenreviews/subjectaccessreviews RBAC for kube-rbac-proxy auth
  • Add Service watch to controller for reconciliation on drift

Assisted-by: Claude

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 24, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 24, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign rfredette for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Thealisyed Thealisyed force-pushed the fix/operand-metrics-exposure branch 2 times, most recently from 41a3c55 to 0297cde Compare March 25, 2026 10:14
ExternalDNS operand pods bind metrics to 127.0.0.1, making them
inaccessible from outside the pod. Prometheus cannot scrape them.

This adds a kube-rbac-proxy sidecar to each operand deployment that
proxies the localhost metrics over HTTPS, along with a Service
(annotated for OpenShift serving cert) and ServiceMonitor for
automatic Prometheus scraping.

Resolves: OCPBUGS-58102

Assisted with Claude
@Thealisyed Thealisyed force-pushed the fix/operand-metrics-exposure branch from 0297cde to 3f8cd03 Compare March 25, 2026 10:54
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 25, 2026

@Thealisyed: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-operator 3f8cd03 link true /test e2e-gcp-operator
ci/prow/e2e-azure-infoblox-operator 3f8cd03 link true /test e2e-azure-infoblox-operator
ci/prow/e2e-azure-operator 3f8cd03 link true /test e2e-azure-operator
ci/prow/verify 3f8cd03 link true /test verify
ci/prow/e2e-aws-shared-vpc-phz-operator 3f8cd03 link true /test e2e-aws-shared-vpc-phz-operator
ci/prow/e2e-aws-operator 3f8cd03 link true /test e2e-aws-operator

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@Thealisyed Thealisyed changed the title [WIP] Expose ExternalDNS operand metrics via kube-rbac-proxy sidecar Expose ExternalDNS operand metrics via kube-rbac-proxy sidecar Mar 26, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 26, 2026
@Thealisyed Thealisyed changed the title Expose ExternalDNS operand metrics via kube-rbac-proxy sidecar OCPBUGS-58102: Expose ExternalDNS operand metrics via kube-rbac-proxy sidecar Mar 26, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Mar 26, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@Thealisyed: This pull request references Jira Issue OCPBUGS-58102, which is invalid:

  • expected the bug to target the "4.22.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

The ExternalDNS operand binds its Prometheus metrics to localhost (127.0.0.1:7979), making them invisible to the cluster monitoring stack. This adds a kube-rbac-proxy sidecar to proxy metrics over HTTPS, along with a Service and ServiceMonitor for Prometheus discovery.

  • Add --kube-rbac-proxy-image CLI flag and operator config plumbing
  • Inject one kube-rbac-proxy sidecar per zone container (ports 8443+) so multi-zone deployments expose all metrics
  • Create metrics Service with serving-cert annotation for auto TLS
  • Create ServiceMonitor with scheme: https, bearerTokenFile, and tlsConfig for authenticated Prometheus scraping
  • Add tokenreviews/subjectaccessreviews RBAC for kube-rbac-proxy auth
  • Add Service watch to controller for reconciliation on drift

Assisted-by: Claude

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Mar 26, 2026
@alebedev87
Copy link
Copy Markdown
Contributor

/assign

@Thealisyed
Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 1, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@Thealisyed: This pull request references Jira Issue OCPBUGS-58102, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @melvinjoseph86

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from melvinjoseph86 April 1, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants