Skip to content

Remove kube-rbac-proxy sidecar from metrics exporter DaemonSet#1060

Open
zeeke wants to merge 1 commit intok8snetworkplumbingwg:masterfrom
zeeke:replace-kube-rbac-proxy
Open

Remove kube-rbac-proxy sidecar from metrics exporter DaemonSet#1060
zeeke wants to merge 1 commit intok8snetworkplumbingwg:masterfrom
zeeke:replace-kube-rbac-proxy

Conversation

@zeeke
Copy link
Copy Markdown
Member

@zeeke zeeke commented Mar 20, 2026

The metrics exporter now handles TLS and authentication/authorization natively, eliminating the need for the kube-rbac-proxy sidecar container.

Depends on:

Resolves:

The metrics exporter now handles TLS and authentication/authorization
natively, eliminating the need for the kube-rbac-proxy sidecar container.

Update the metrics exporter DaemonSet to have a single container with
TLS flags, authn/authz, and cert volume mount.

Remove METRICS_EXPORTER_KUBE_RBAC_PROXY_IMAGE from controller, Helm
chart, deploy manifests, env.sh, and tests

Resolves: k8snetworkplumbingwg#811

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
@github-actions
Copy link
Copy Markdown

Thanks for your PR,
To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the metrics exporter component by integrating TLS and authentication/authorization capabilities directly into the exporter itself. This change eliminates the dependency on the kube-rbac-proxy sidecar, leading to a more streamlined deployment architecture, reduced resource consumption, and simplified management of the metrics collection process.

Highlights

  • Native TLS and Authentication: The metrics exporter now natively handles TLS and authentication/authorization, removing the need for external proxies.
  • Kube-RBAC-Proxy Sidecar Removal: The kube-rbac-proxy sidecar container has been completely removed from the metrics exporter DaemonSet, simplifying the deployment.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly removes the kube-rbac-proxy sidecar from the metrics exporter DaemonSet, integrating TLS and authentication/authorization directly into the exporter. The changes are consistently applied across manifests, controller code, tests, and documentation. The overall change improves the architecture by simplifying the deployment. I have one suggestion to improve maintainability.

- --web.listen-address=[$(HOST_IP)]:{{.MetricsExporterPort}}
- --tls-cert-file=/etc/metrics/tls.crt
- --tls-private-key-file=/etc/metrics/tls.key
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better maintainability, consider defining this long list of TLS cipher suites as a constant in a Go file and passing it to the template. Hardcoding it here makes it difficult to read and manage.

For example, you could:

  1. Define a constant in pkg/consts/constants.go.
  2. Pass it to the template data in controllers/sriovoperatorconfig_controller.go.
  3. Use the variable in this template as shown in the suggestion.
- --tls-cipher-suites={{.TLSCipherSuites}}

@zeeke zeeke added the hold label Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants