Skip to content

OCPBUGS-90506: Replace kube-rbac-proxy sidecar with controller-runtime FilterProvider - #502

Open
alebedev87 wants to merge 2 commits into
openshift:mainfrom
alebedev87:metrics-cmd
Open

OCPBUGS-90506: Replace kube-rbac-proxy sidecar with controller-runtime FilterProvider#502
alebedev87 wants to merge 2 commits into
openshift:mainfrom
alebedev87:metrics-cmd

Conversation

@alebedev87

@alebedev87 alebedev87 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace the kube-rbac-proxy sidecar container with controller-runtime's built-in filters.WithAuthenticationAndAuthorization for metrics endpoint authentication and authorization. The operator now handles TLS termination and Kubernetes TokenReview/SubjectAccessReview directly, eliminating the need for a separate proxy container and its image dependency.

  • Configure controller-runtime metrics.Options with SecureServing, FilterProvider, and OpenShift serving certs mounted from the service-ca annotation
  • Inline metrics flags (--metrics-tls-cert-dir), port, volume, and volumeMount directly into config/manager/manager.yaml instead of using a kustomize strategic merge patch that duplicated the full args list
  • Remove kube-rbac-proxy sidecar container from the deployment and CSV
  • Delete auth_proxy_role.yaml and auth_proxy_role_binding.yaml; consolidate tokenreviews and subjectaccessreviews permissions into the main operator ClusterRole
  • Delete manager_auth_proxy_patch.yaml and manager_insecure_tls_auth_proxy_patch.yaml

Screenshot of scraped EDO metrics from OpenShift console

image

@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 Jun 17, 2026
@openshift-ci
openshift-ci Bot requested review from jcmoraisjr and rikatz June 17, 2026 11:38
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The operator now serves authenticated HTTPS metrics on :8443 with certificates from /var/run/secrets/serving-cert. Deployment manifests mount the metrics Secret and remove the kube-rbac-proxy sidecar and auth-proxy RBAC resources. Review permissions move to the operator ClusterRole. The OLM CSV and indirect Go dependencies are updated.

Possibly related PRs

Suggested reviewers: melvinjoseph86, jcmoraisjr, rikatz


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 errors, 1 warning)

Check name Status Explanation Resolution
No-Weak-Crypto ❌ Error The PR adds the metrics auth dependency chain, which introduces vendor/golang.org/x/net/websocket/hybi.go using crypto/sha1.New for the WebSocket handshake. Avoid introducing the SHA-1 implementation, or isolate and replace the WebSocket dependency with an approved implementation; document any unavoidable protocol-mandated SHA-1 use.
No-Sensitive-Data-In-Logs ❌ Error The PR enables a metrics filter that logs attributes.User.GetName() on authorization failures; this request-derived Kubernetes username may be an email or other PII. Remove the username from authorization error and denial logs, or replace it with a non-identifying value.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (12 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The pull request changes no *_test.go files and adds no Ginkgo test declarations, so it introduces no dynamic or overly specific test names.
Test Structure And Quality ✅ Passed The PR changes no *_test.go files; the available base-to-HEAD diff contains no Ginkgo test changes to assess.
Microshift Test Compatibility ✅ Passed The PR diff adds no test files and no Ginkgo constructs; it changes operator code, manifests, RBAC, and dependencies only.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR changes no test files and adds no Ginkgo markers such as It, Describe, Context, or When; the SNO test check is therefore inapplicable.
Topology-Aware Scheduling Compatibility ✅ Passed The diff changes metrics TLS, RBAC, and container volumes only; existing replicas=1 and maxUnavailable=25% remain unchanged, with no affinity, spread, node selector, toleration, or PDB constraints...
Ote Binary Stdout Contract ✅ Passed The PR diff adds no stdout writes or suite setup; main.go only adds a flag, zap defaults to os.Stderr, and existing e2e TestMain prints are unchanged.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR changes no Ginkgo or e2e test files and adds no It/Describe/Context/When declarations; the check is therefore inapplicable.
Container-Privileges ✅ Passed Changed deployment and CSV retain runAsNonRoot, privileged:false, allowPrivilegeEscalation:false, and drop ALL; no added hostPID, hostNetwork, hostIPC, SYS_ADMIN, or root settings were found.
Title check ✅ Passed The title clearly and concisely describes replacing the kube-rbac-proxy sidecar with controller-runtime FilterProvider.
Description check ✅ Passed The description directly explains the metrics authentication, TLS, RBAC, deployment, and sidecar changes in the pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/default/manager_insecure_tls_auth_proxy_patch.yaml`:
- Around line 1-3: The patch omits the `--metrics-tls-cert-dir` flag, causing
the operator to default to `/var/run/secrets/serving-cert` even though no cert
volume is mounted in this development/testing configuration. Add an explicit
`--metrics-tls-cert-dir` argument to the manager container args in the patch and
set it to an empty string or a temporary directory path so that self-signed
metrics certificates are generated in a writable location instead of the missing
mounted volume.

In `@go.mod`:
- Line 115: The go.opentelemetry.io/otel/sdk dependency is pinned to v1.33.0
which contains security vulnerabilities that are only fixed in v1.43.0 or later.
Update the go.opentelemetry.io/otel/sdk version from v1.33.0 to v1.43.0 in the
go.mod file. After updating, also refresh any dependent OTLP modules that
reference go.opentelemetry.io/otel/sdk to maintain version coherence across all
module dependencies.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c21c0e2e-83b7-4804-8a26-62c854f58c6d

📥 Commits

Reviewing files that changed from the base of the PR and between 08ec426 and d164ba4.

⛔ Files ignored due to path filters (287)
  • go.sum is excluded by !**/*.sum
  • vendor/cel.dev/expr/.bazelversion is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/.gitattributes is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/CODE_OF_CONDUCT.md is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/CONTRIBUTING.md is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/GOVERNANCE.md is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/MAINTAINERS.md is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/MODULE.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/WORKSPACE is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/WORKSPACE.bzlmod is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/checked.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/cloudbuild.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/eval.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/explain.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/regen_go_proto.sh is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/regen_go_proto_canonical_protos.sh is excluded by !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/syntax.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/cel.dev/expr/value.pb.go is excluded by !**/*.pb.go, !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/antlrdoc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/atn.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/atn_config.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/atn_config_set.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/atn_deserialization_options.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/atn_deserializer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/atn_simulator.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/atn_state.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/atn_type.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/char_stream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/common_token_factory.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/common_token_stream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/comparators.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/configuration.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/dfa.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/dfa_serializer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/dfa_state.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/diagnostic_error_listener.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/error_listener.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/error_strategy.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/file_stream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/input_stream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/int_stream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/interval_set.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/jcollect.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/lexer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/lexer_action.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/lexer_action_executor.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/lexer_atn_simulator.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/ll1_analyzer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/nostatistics.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/parser.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/parser_atn_simulator.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/parser_rule_context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/prediction_context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/prediction_context_cache.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/prediction_mode.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/recognizer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/rule_context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/semantic_context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/statistics.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/stats_data.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/token.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/token_source.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/token_stream.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/tokenstream_rewriter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/trace_listener.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/transition.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/tree.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/trees.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/antlr4-go/antlr/v4/utils.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cenkalti/backoff/v4/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cenkalti/backoff/v4/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cenkalti/backoff/v4/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cenkalti/backoff/v4/backoff.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cenkalti/backoff/v4/context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cenkalti/backoff/v4/exponential.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cenkalti/backoff/v4/retry.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cenkalti/backoff/v4/ticker.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cenkalti/backoff/v4/timer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/cenkalti/backoff/v4/tries.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/cel.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/decls.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/env.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/folding.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/inlining.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/io.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/library.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/macro.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/optimizer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/options.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/program.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/cel/validator.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/checker.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/cost.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/decls/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/decls/decls.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/env.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/format.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/mapping.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/options.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/printer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/scopes.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/checker/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/ast/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/ast/ast.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/ast/conversion.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/ast/expr.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/ast/factory.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/ast/navigable.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/containers/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/containers/container.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/cost.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/debug/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/debug/debug.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/decls/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/decls/decls.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/error.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/functions/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/functions/functions.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/location.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/operators/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/operators/operators.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/overloads/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/overloads/overloads.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/runes/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/runes/buffer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/source.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/stdlib/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/stdlib/standard.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/any_value.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/bool.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/bytes.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/compare.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/double.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/duration.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/err.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/int.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/iterator.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/json_value.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/list.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/map.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/null.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/object.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/optional.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/overflow.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/pb/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/pb/checked.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/pb/enum.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/pb/equal.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/pb/file.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/pb/pb.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/pb/type.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/provider.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/ref/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/ref/provider.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/ref/reference.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/string.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/timestamp.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/comparer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/container.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/field_tester.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/indexer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/iterator.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/lister.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/mapper.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/matcher.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/math.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/receiver.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/sizer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/traits.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/traits/zeroer.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/uint.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/unknown.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/common/types/util.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/bindings.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/comprehensions.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/encoders.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/formatting.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/guards.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/lists.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/math.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/native.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/protos.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/sets.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/ext/strings.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/activation.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/attribute_patterns.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/attributes.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/decorators.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/dispatcher.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/evalstate.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/functions/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/functions/functions.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/interpretable.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/interpreter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/optimizations.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/planner.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/prune.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/interpreter/runtimecost.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/BUILD.bazel is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/CEL.g4 is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/CEL.interp is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/CEL.tokens is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/CELLexer.interp is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/CELLexer.tokens is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/cel_base_listener.go is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/cel_base_visitor.go is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/cel_lexer.go is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/cel_listener.go is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/cel_parser.go is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/cel_visitor.go is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/doc.go is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/gen/generate.sh is excluded by !**/gen/**, !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/helper.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/input.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/macro.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/options.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/parser.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/unescape.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/google/cel-go/parser/unparser.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/compile.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/fuzz.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/parse.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/internal/httprule/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/context.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/convert.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/errors.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/fieldmask.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/handler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_httpbodyproto.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_json.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_jsonpb.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshal_proto.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/marshaler_registry.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/mux.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/pattern.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/proto2_convert.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/runtime/query.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/BUILD.bazel is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/pattern.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/readerfactory.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/trie.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/stoewer/go-strcase/.gitignore is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/stoewer/go-strcase/.golangci.yml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/stoewer/go-strcase/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/stoewer/go-strcase/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/stoewer/go-strcase/camel.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/stoewer/go-strcase/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/stoewer/go-strcase/helper.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/stoewer/go-strcase/kebab.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/stoewer/go-strcase/snake.go is excluded by !**/vendor/**, !vendor/**
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/README.md is excluded by !**/vendor/**, !vendor/**
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/clients.go is excluded by !**/vendor/**, !vendor/**
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/exporter.go is excluded by !**/vendor/**, !vendor/**
  • vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform/attribute.go is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (13)
  • bundle/manifests/external-dns-operator.clusterserviceversion.yaml
  • config/default/kustomization.yaml
  • config/default/manager_auth_proxy_patch.yaml
  • config/default/manager_insecure_tls_auth_proxy_patch.yaml
  • config/manager/manager.yaml
  • config/rbac/auth_proxy_role.yaml
  • config/rbac/auth_proxy_role_binding.yaml
  • config/rbac/kustomization.yaml
  • config/rbac/role.yaml
  • go.mod
  • main.go
  • pkg/operator/config/config.go
  • pkg/operator/operator.go
💤 Files with no reviewable changes (3)
  • config/rbac/kustomization.yaml
  • config/rbac/auth_proxy_role.yaml
  • config/rbac/auth_proxy_role_binding.yaml

Comment thread config/default/manager_insecure_tls_auth_proxy_patch.yaml Outdated
Comment thread go.mod

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/manager/manager.yaml`:
- Around line 71-79: Add CPU and memory limits to every container resource
specification in the manager configuration, including the operator container and
embedded OLM deployment, while preserving the existing requests. Ensure each
container defines both limits.cpu and limits.memory as required by the path
instructions.
- Around line 71-79: Update the operator container security context in
manager.yaml to set readOnlyRootFilesystem: true, while preserving the existing
read-only metrics and webhook Secret mounts. If the operator requires runtime
writes, add only the necessary emptyDir mount, and apply the same setting to the
embedded OLM deployment.
- Around line 35-46: Add a NetworkPolicy alongside the manager workload in
manager.yaml, selecting the manager pods and allowing ingress only to TCP port
8443 from the intended Prometheus source pods or namespace. Deny all other
ingress to the metrics endpoint while preserving the existing metrics container
port configuration.
- Around line 44-46: Add a livenessProbe to the rendered Deployment alongside
the existing readinessProbe, reusing the same health-check port and endpoint
configuration. Keep the probe settings consistent with the readiness check so
hung or deadlocked containers can be restarted.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

Comment thread config/manager/manager.yaml
Comment thread config/manager/manager.yaml
Comment thread config/manager/manager.yaml
@alebedev87
alebedev87 force-pushed the metrics-cmd branch 2 times, most recently from c5bf61f to 08e30eb Compare August 4, 2026 08:47
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 4, 2026
@alebedev87 alebedev87 changed the title [WIP] Replace kube-rbac-proxy sidecar with controller-runtime FilterProvider Replace kube-rbac-proxy sidecar with controller-runtime FilterProvider Aug 4, 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 Aug 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
go.mod (1)

111-117: 🔒 Security & Privacy | 🟠 Major

Security Misconfiguration (CWE-426): Untrusted Search Path

Upgrade the vulnerable OpenTelemetry modules before merge.

Line 115 still pins go.opentelemetry.io/otel/sdk v1.33.0. OSV lists this version in the affected range for GO-2026-4394, fixed in v1.40.0, and GO-2026-5426, fixed in v1.43.0. Upgrade the OpenTelemetry API, SDK, metric, trace, and OTLP modules together to at least v1.43.0, then regenerate go.sum. Confirm the supported target platforms because the reported paths affect Darwin and BSD/Solaris systems. (osv.dev)

#!/bin/bash
set -euo pipefail

for id in GO-2026-4394 GO-2026-5426; do
  curl -sS "https://api.osv.dev/v1/vulns/${id}" |
    jq '{id, aliases, affected}'
done

go mod verify
go list -m -f '{{.Path}} {{.Version}}' \
  go.opentelemetry.io/otel \
  go.opentelemetry.io/otel/exporters/otlp/otlptrace \
  go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc \
  go.opentelemetry.io/otel/metric \
  go.opentelemetry.io/otel/sdk \
  go.opentelemetry.io/otel/trace
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` around lines 111 - 117, Upgrade all OpenTelemetry modules shown in
go.mod—including API, SDK, metric, trace, and OTLP exporter/protocol modules—to
at least v1.43.0 as a consistent set, then regenerate go.sum and verify the
resolved dependencies with go mod verify and go list. Confirm the resulting
dependency versions support the affected Darwin and BSD/Solaris target
platforms.

Sources: MCP tools, Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@go.mod`:
- Around line 111-117: Upgrade all OpenTelemetry modules shown in
go.mod—including API, SDK, metric, trace, and OTLP exporter/protocol modules—to
at least v1.43.0 as a consistent set, then regenerate go.sum and verify the
resolved dependencies with go mod verify and go list. Confirm the resulting
dependency versions support the affected Darwin and BSD/Solaris target
platforms.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@go.mod`:
- Line 36: Update the production dependency versions for
github.com/google/cel-go to v0.29.0 and go.opentelemetry.io/otel/sdk to v1.40.0,
including any corresponding go.mod/go.sum entries required by the module graph.
Do not upgrade google.golang.org/grpc solely for the test/e2e-only reachability
noted in the review.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

Comment thread go.mod
)

require (
cel.dev/expr v0.19.1 // indirect

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

go mod verify
osv-scanner scan source -r .
go-licenses check ./...

awk '$0 ~ /\/\/ indirect$/ {print $1}' go.mod |
  while read -r module; do
    go mod why -m "$module"
  done

rg -n -i 'sbom|provenance|attest|sigstore|cosign|sign' \
  .github Makefile* Dockerfile* 2>/dev/null || true

Repository: openshift/external-dns-operator

Length of output: 3776


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- go.mod ---'
cat -n go.mod

printf '%s\n' '--- matching go.sum entries ---'
python3 - <<'PY'
from pathlib import Path
mods = []
for line in Path("go.mod").read_text().splitlines():
    parts = line.split()
    if len(parts) >= 2 and not line.lstrip().startswith(("module ", "go ", "toolchain ")):
        mods.append((parts[0], parts[1]))
sum_text = Path("go.sum").read_text() if Path("go.sum").exists() else ""
for mod, ver in mods:
    matches = [line for line in sum_text.splitlines()
               if line.startswith(f"{mod} {ver} ")]
    print(f"{mod} {ver}: {'; '.join(matches) if matches else 'MISSING'}")
PY

printf '%s\n' '--- release and dependency controls ---'
find .github -maxdepth 3 -type f -print 2>/dev/null | sort
rg -n -i 'sbom|provenance|attest|sigstore|cosign|sign|osv|license|go mod verify|vendor' \
  .github Makefile* Dockerfile* go.mod go.sum 2>/dev/null || true

Repository: openshift/external-dns-operator

Length of output: 28542


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- dependency provenance ---'
for module in \
  cel.dev/expr \
  github.com/google/cel-go \
  go.opentelemetry.io/otel/sdk \
  google.golang.org/grpc
do
  printf '\n[%s]\n' "$module"
  go mod why -m "$module" 2>&1 || true
done

printf '%s\n' '--- tracked release and dependency-control files ---'
git ls-files | rg '(^|/)(go\.mod|go\.sum|vendor/|\.github/|Makefile|Dockerfile|.*(sbom|provenance|attest|cosign|sigstore|sign).*)$' || true

printf '%s\n' '--- relevant vendored license files ---'
find vendor -type f \( -iname 'LICENSE*' -o -iname 'COPYING*' -o -iname 'NOTICE*' \) \
  2>/dev/null | rg 'cel|otel|grpc|google' || true

printf '%s\n' '--- exact checksum coverage for go.mod modules ---'
python3 - <<'PY'
from pathlib import Path
import re

text = Path("go.mod").read_text()
mods = []
in_require = False
for raw in text.splitlines():
    line = raw.strip()
    if line.startswith("require ("):
        in_require = True
        continue
    if in_require and line == ")":
        in_require = False
        continue
    if in_require:
        m = re.match(r"(\S+)\s+(\S+)", line)
        if m:
            mods.append(m.groups())

sums = Path("go.sum").read_text().splitlines()
missing = []
for mod, ver in mods:
    if not any(line.startswith(f"{mod} {ver} ") for line in sums):
        missing.append(f"{mod} {ver}")
print(f"module_entries={len(mods)} missing_checksums={len(missing)}")
for item in missing:
    print(item)
PY

Repository: openshift/external-dns-operator

Length of output: 13594


Vulnerable Dependency (CWE-1104)

Upgrade the production-reachable vulnerable dependencies.

github.com/google/cel-go v0.23.2 and go.opentelemetry.io/otel/sdk v1.33.0 are reachable from production packages and have OSV fixes at v0.29.0 and v1.40.0. Upgrade them before merge. google.golang.org/grpc v1.68.1 is reachable only through test/e2e in this graph.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` at line 36, Update the production dependency versions for
github.com/google/cel-go to v0.29.0 and go.opentelemetry.io/otel/sdk to v1.40.0,
including any corresponding go.mod/go.sum entries required by the module graph.
Do not upgrade google.golang.org/grpc solely for the test/e2e-only reachability
noted in the review.

Source: Path instructions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same reasoning as for otel/sdk. It's an indirect dependency which we will handle as part of the regular k8s/controller-runtime bump.

@alebedev87

Copy link
Copy Markdown
Contributor Author

/retest-required

@gcs278

gcs278 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

/assign @bentito

@grzpiotrowski

Copy link
Copy Markdown
Contributor

/retitle OCPBUGS-90506: Replace kube-rbac-proxy sidecar with controller-runtime FilterProvider

@openshift-ci openshift-ci Bot changed the title Replace kube-rbac-proxy sidecar with controller-runtime FilterProvider OCPBUGS-90506: Replace kube-rbac-proxy sidecar with controller-runtime FilterProvider Aug 18, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Aug 18, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@alebedev87: This pull request references Jira Issue OCPBUGS-90506, which is valid.

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

Requesting review from QA contact:
/cc @melvinjoseph86

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

Details

In response to this:

Summary

Replace the kube-rbac-proxy sidecar container with controller-runtime's built-in filters.WithAuthenticationAndAuthorization for metrics endpoint authentication and authorization. The operator now handles TLS termination and Kubernetes TokenReview/SubjectAccessReview directly, eliminating the need for a separate proxy container and its image dependency.

  • Configure controller-runtime metrics.Options with SecureServing, FilterProvider, and OpenShift serving certs mounted from the service-ca annotation
  • Inline metrics flags (--metrics-tls-cert-dir), port, volume, and volumeMount directly into config/manager/manager.yaml instead of using a kustomize strategic merge patch that duplicated the full args list
  • Remove kube-rbac-proxy sidecar container from the deployment and CSV
  • Delete auth_proxy_role.yaml and auth_proxy_role_binding.yaml; consolidate tokenreviews and subjectaccessreviews permissions into the main operator ClusterRole
  • Delete manager_auth_proxy_patch.yaml and manager_insecure_tls_auth_proxy_patch.yaml

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 August 18, 2026 13:36
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 18, 2026
…ider`

Replace the `kube-rbac-proxy` sidecar container with controller-runtime's built-in `filters.WithAuthenticationAndAuthorization` for metrics endpoint authentication and authorization. The operator now handles TLS termination and Kubernetes TokenReview/SubjectAccessReview directly, eliminating the need for a separate proxy container.

- Configure `metrics.Options` with `SecureServing`, `FilterProvider`, and OpenShift serving certs
- Move metrics flags, port, volume, and volumeMount directly into `config/manager/manager.yaml` instead of a kustomize strategic merge patch
- Remove `kube-rbac-proxy` sidecar from the deployment and CSV
- Delete `auth_proxy_role.yaml` and `auth_proxy_role_binding.yaml`; add `tokenreviews` and `subjectaccessreviews` permissions to the main operator ClusterRole
- Delete `manager_auth_proxy_patch.yaml` and `manager_insecure_tls_auth_proxy_patch.yaml`

Co-Authored-By: Claude
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 19, 2026
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@openshift-ci

openshift-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

[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 ask for approval from bentito. 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

Register `healthz.Ping` on the `/healthz` endpoint and add a
`livenessProbe` to the deployment manifests. This ensures kubelet
restarts the operator pod if the process becomes unresponsive.

Co-Authored-By: Claude
@bentito

bentito commented Aug 19, 2026

Copy link
Copy Markdown

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 19, 2026
@openshift-ci

openshift-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

@alebedev87: The following test 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/verify 94315ed link true /test verify

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.

protocol: TCP
- containerPort: 8443
name: https
livenessProbe:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like the bundle needs to be regenerated with make bundle for the order to match with what's generated in the verify test but otherwise

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/severity-moderate Referenced Jira bug's severity is moderate 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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants