Skip to content

NE-2739: Migrate operator to native metrics protection with centralized TLS - #313

Open
bentito wants to merge 11 commits into
openshift:mainfrom
bentito:feature/NE-2739-native-metrics
Open

NE-2739: Migrate operator to native metrics protection with centralized TLS#313
bentito wants to merge 11 commits into
openshift:mainfrom
bentito:feature/NE-2739-native-metrics

Conversation

@bentito

@bentito bentito commented Jul 15, 2026

Copy link
Copy Markdown

Migrates the aws-load-balancer-operator from utilizing kube-rbac-proxy sidecars to the native secure serving metrics server introduced in newer versions of controller-runtime.

Key Changes:

  • main.go: Integrated secure serving on port :8443 using the native auth and authz filters. Added startup resolution of the OpenShift APIServer configuration named cluster to parse and apply the centralized TLSSecurityProfile (MinVersion, CipherSuites, and elliptic curves/groups, including post-quantum X25519MLKEM768). Restressed HTTP/2 by disabling it on the metrics server to match External DNS Operator (EDO) PR 502's security posture.
  • config/: Deleted kube-rbac-proxy patches, updated manager deployment configuration to expose port 8443 directly, and commented out the auth proxy references in default Kustomizations.
  • bundle/ & vendor/: Regenerated the OLM bundle using make bundle and validated it successfully with operator-sdk. Resolved the vendored dependencies and updated the test CRD fixtures to keep test pipelines completely green.

Fully validated and verified locally using make verify and make lint with zero issues found.

@openshift-ci-robot

openshift-ci-robot commented Jul 15, 2026

Copy link
Copy Markdown

@bentito: This pull request references NE-2739 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Migrates the aws-load-balancer-operator from utilizing kube-rbac-proxy sidecars to the native secure serving metrics server introduced in newer versions of controller-runtime.

Key Changes:

  • main.go: Integrated secure serving on port :8443 using the native auth and authz filters. Added startup resolution of the OpenShift APIServer configuration named cluster to parse and apply the centralized TLSSecurityProfile (MinVersion, CipherSuites, and elliptic curves/groups, including post-quantum X25519MLKEM768). Restressed HTTP/2 by disabling it on the metrics server to match External DNS Operator (EDO) PR 502's security posture.
  • config/: Deleted kube-rbac-proxy patches, updated manager deployment configuration to expose port 8443 directly, and commented out the auth proxy references in default Kustomizations.
  • bundle/ & vendor/: Regenerated the OLM bundle using make bundle and validated it successfully with operator-sdk. Resolved the vendored dependencies and updated the test CRD fixtures to keep test pipelines completely green.

Fully validated and verified locally using make verify and make lint with zero issues found.

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/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: ceabc7e0-82dd-4d8b-8c5e-849820a2ed0f

📥 Commits

Reviewing files that changed from the base of the PR and between 24856d3 and 322397a.

📒 Files selected for processing (5)
  • assets/operator-iam-policy.json
  • hack/generate-iam-from-credrequest.sh
  • hack/operator-permission-policy.json
  • main.go
  • pkg/operator/credentials_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • hack/generate-iam-from-credrequest.sh
  • main.go

📝 Walkthrough

Walkthrough

The manager now serves authenticated and authorized HTTPS metrics on port 8443 with TLS settings derived from the API server profile. Deployment manifests remove the kube-rbac-proxy sidecar and expose the manager HTTPS port. The Infrastructure CRD gains updated vSphere validation, topology values, and cloud load balancer schemas. Go dependencies and supporting tooling are updated.

Suggested reviewers: rfredette, grzpiotrowski


Important

Pre-merge checks failed

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

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
No-Weak-Crypto ❌ Error main.go applies Old or Custom profile ciphers directly; the added OpenShift profile includes DES-CBC3-SHA and maps it to a 3DES TLS suite. Reject DES/3DES, RC4, and SHA-1 suites before assigning tls.Config.CipherSuites, and enforce a TLS 1.2+ AEAD allowlist for Old and Custom profiles.
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (13 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary migration from kube-rbac-proxy to native metrics protection with centralized TLS.
Description check ✅ Passed The description directly explains the metrics protection migration, TLS configuration, deployment updates, and validation results.
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 only changed test updates a filepath expectation; no Ginkgo title changed, and existing Ginkgo titles use static descriptive strings.
Test Structure And Quality ✅ Passed The PR changes only one non-Ginkgo unit test, updating a portable temporary-file prefix; no Ginkgo It blocks, cluster operations, waits, or setup/cleanup were added or changed.
Microshift Test Compatibility ✅ Passed The PR adds no Ginkgo tests or new It/Describe/Context/When declarations. The only changed Go test uses standard testing.T and changes a temporary-file path.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds no Ginkgo e2e tests: test/e2e has no changed paths or added It/Describe/Context/When declarations; the only Go test change is a unit-test path portability fix.
Topology-Aware Scheduling Compatibility ✅ Passed The PR adds no topology-sensitive scheduling fields; manifests retain replicas: 1, and the operand Deployment constructor has no affinity, spread, selector, toleration, or PDB constraints.
Ote Binary Stdout Contract ✅ Passed No OTE or openshift-tests binary exists; changed main.go has no stdout writes, and controller-runtime zap defaults to os.Stderr.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR adds no Ginkgo e2e tests; its only changed test updates a platform-safe temporary-file prefix and adds no IPv4 or external connectivity assumption.
Container-Privileges ✅ Passed Deployment and bundle manifests set runAsNonRoot: true, allowPrivilegeEscalation: false, and drop ALL capabilities; no prohibited host namespace, SYS_ADMIN, privileged, or root settings were found.
No-Sensitive-Data-In-Logs ✅ Passed Final added logs contain only TLS cipher/group identifiers or fixed fallback messages; APIServer client and fetch errors are not logged, so no credentials, tokens, PII, or hostnames are exposed.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

Error: can't load config: can't unmarshal config by viper (flags, file): 1 error(s) decoding:

  • 'output.formats' expected a map, got 'slice'
    The command is terminated due to an error: can't load config: can't unmarshal config by viper (flags, file): 1 error(s) decoding:

  • 'output.formats' expected a map, got 'slice'


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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: 3

🧹 Nitpick comments (4)
main.go (2)

351-361: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider logging dropped/unsupported TLS groups.

Groups without a Go CurveID mapping are silently skipped. A debug/info log when a configured TLSGroup has no equivalent would make misconfigurations easier to diagnose.

🤖 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 `@main.go` around lines 351 - 361, Update the TLS group processing around
TLSGroupToCurveID to log each configured group that lacks a CurveID mapping
before skipping it. Use the existing logging mechanism and include the
unsupported group value, while preserving the current behavior for supported
groups and empty curve lists.

301-364: 🩺 Stability & Availability | 🔵 Trivial

TLS profile is resolved once at startup; cluster profile changes require a pod restart to take effect.

There's no watch/reconcile loop reacting to updates on the APIServer object's TLSSecurityProfile, so an admin changing the cluster TLS profile won't be picked up by the running metrics server until the operator pod restarts. This may be an acceptable initial tradeoff, but worth confirming it's the intended behavior for this release given other OpenShift components implement a watcher for exactly this scenario.

🤖 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 `@main.go` around lines 301 - 364, Confirm and preserve the intended
startup-only behavior for TLS profile resolution in getTLSSecurityProfile and
getTLSConfigFromProfile, or add a watch/reconcile path that refreshes the
metrics server’s TLS configuration when the APIServer object’s
TLSSecurityProfile changes. Ensure runtime profile updates take effect without
requiring an operator pod restart if dynamic behavior is required for this
release.
demonstrate-deregistration-gap.sh (2)

68-92: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

diagnose_failure is defined but never invoked.

The detailed diagnostics helper (CR status, CredentialsRequest, deployments/pods, manager logs) would be most useful right when the script falls back to SIMULATION_MODE=true, but nothing calls it.

🤖 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 `@demonstrate-deregistration-gap.sh` around lines 68 - 92, Invoke
diagnose_failure at the point where the script falls back to
SIMULATION_MODE=true, before or alongside the fallback message. Keep the
existing diagnostic collection and simulation behavior unchanged, ensuring the
CR, CredentialsRequest, workload, and manager log checks run automatically when
the fallback occurs.

1-14: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing project copyright header on all three new files. Contribution guidelines require new files to carry the project's copyright template at the top, updated to the current year; none of these new additions include one.

  • demonstrate-deregistration-gap.sh#L1-L14: add the copyright header comment block before the shebang/comment banner.
  • OCPBUGS-97941-analysis.md#L1-L2: add the copyright header before the # Technical Analysis... title.
  • OCPBUGS-97941-short-analysis.md#L1-L2: add the copyright header before the # OCPBUGS-97941... title.

Based on learnings, "New files must include the project copyright message template at the top as a comment, with the year updated."

🤖 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 `@demonstrate-deregistration-gap.sh` around lines 1 - 14, Add the project’s
standard copyright header, updated to the current year, at the top of
demonstrate-deregistration-gap.sh before the shebang/comment banner, and at the
top of OCPBUGS-97941-analysis.md and OCPBUGS-97941-short-analysis.md before
their titles.

Source: Learnings

🤖 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 286: Update the google.golang.org/grpc dependency in go.mod from v1.72.2
to the patched v1.79.3 or later release, then regenerate go.sum so the module
checksums match the upgraded dependency.
- Around line 258-262: Upgrade the OpenTelemetry dependency set represented by
the go.mod entries for otel, exporters, metric, and sdk to a consistent current
version that includes the fixes from otel v1.41.0 and sdk v1.40.0. Regenerate
the Go module graph so go.mod and go.sum reflect the coordinated updates.

In `@main.go`:
- Around line 128-134: Replace context.TODO() in the startup call to
getTLSSecurityProfile with a bounded context.Context, creating and canceling a
startup timeout context before the fetch. Pass that context through
getTLSSecurityProfile so its client.Get call observes the deadline, while
preserving the existing error logging and exit behavior.

---

Nitpick comments:
In `@demonstrate-deregistration-gap.sh`:
- Around line 68-92: Invoke diagnose_failure at the point where the script falls
back to SIMULATION_MODE=true, before or alongside the fallback message. Keep the
existing diagnostic collection and simulation behavior unchanged, ensuring the
CR, CredentialsRequest, workload, and manager log checks run automatically when
the fallback occurs.
- Around line 1-14: Add the project’s standard copyright header, updated to the
current year, at the top of demonstrate-deregistration-gap.sh before the
shebang/comment banner, and at the top of OCPBUGS-97941-analysis.md and
OCPBUGS-97941-short-analysis.md before their titles.

In `@main.go`:
- Around line 351-361: Update the TLS group processing around TLSGroupToCurveID
to log each configured group that lacks a CurveID mapping before skipping it.
Use the existing logging mechanism and include the unsupported group value,
while preserving the current behavior for supported groups and empty curve
lists.
- Around line 301-364: Confirm and preserve the intended startup-only behavior
for TLS profile resolution in getTLSSecurityProfile and getTLSConfigFromProfile,
or add a watch/reconcile path that refreshes the metrics server’s TLS
configuration when the APIServer object’s TLSSecurityProfile changes. Ensure
runtime profile updates take effect without requiring an operator pod restart if
dynamic behavior is required for this release.
🪄 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
Comment thread go.mod
Comment thread main.go
@bentito

bentito commented Jul 15, 2026

Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot

openshift-ci-robot commented Jul 15, 2026

Copy link
Copy Markdown

@bentito: This pull request references NE-2739 which is a valid jira issue.

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.

@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/manifests/kustomization.yaml`:
- Line 22: Update the volumeMount removal patch in the kustomization
configuration to target the cert mount rather than index 0, which still refers
to bound-sa-token; identify the mount by name where supported, or reorder the
patch operations so the cert mount is removed reliably.

In `@hack/operator-permission-policy.json`:
- Around line 5-24: Update the IAM policy entries shown so the keys use AWS’s
canonical casing: change every action, effect, and resource key to Action,
Effect, and Resource, preserving all existing values and permissions.
🪄 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: 524ec681-e2d8-4faa-b402-836bc2c4c086

📥 Commits

Reviewing files that changed from the base of the PR and between f7530de and 5b48f30.

📒 Files selected for processing (3)
  • config/default/manager_webhook_patch.yaml
  • config/manifests/kustomization.yaml
  • hack/operator-permission-policy.json
💤 Files with no reviewable changes (1)
  • config/default/manager_webhook_patch.yaml

Comment thread config/manifests/kustomization.yaml
Comment thread hack/operator-permission-policy.json Outdated
@bentito

bentito commented Jul 15, 2026

Copy link
Copy Markdown
Author

Unsupported TLS groups logging added and accidental files removed in commit 26970fc.

@bentito

bentito commented Jul 15, 2026

Copy link
Copy Markdown
Author

/assign @alebedev87
This is pretty similar to your work on EDO openshift/external-dns-operator#502 so hoping you could review this. Thanks!

@bentito

bentito commented Jul 23, 2026

Copy link
Copy Markdown
Author

/retest

@bentito

bentito commented Jul 23, 2026

Copy link
Copy Markdown
Author

/retest-required

@bentito

bentito commented Jul 23, 2026

Copy link
Copy Markdown
Author

/retest

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@bentito: GitHub didn't allow me to assign the following users: davide.

Note that only openshift members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

Details

In response to this:

/assign davide

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.

@bentito

bentito commented Jul 23, 2026

Copy link
Copy Markdown
Author

/assign @davidesalerno

@bentito

bentito commented Jul 24, 2026

Copy link
Copy Markdown
Author

/retest-required

2 similar comments
@bentito

bentito commented Jul 24, 2026

Copy link
Copy Markdown
Author

/retest-required

@bentito

bentito commented Jul 27, 2026

Copy link
Copy Markdown
Author

/retest-required

@bentito

bentito commented Jul 28, 2026

Copy link
Copy Markdown
Author

@davidesalerno I think the rosa test is a permafail until someone updates a role somewhere. Can you review when you get a chance please

@alebedev87

Copy link
Copy Markdown
Contributor

I think the rosa test is a permafail until someone updates

Right, after we lost QEs some Prow CI steps were left unmaintained. We need to come back to this job and fix it. But for the moment we'd have to ignore it.

@alebedev87 alebedev87 left a comment

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.

Mostly LGTM. Some minor remarks and questions. One important thing I noticed though, ALBO doesn't add servicemointor so the metrics are not actually scraped. This is gap which we can address as a separate PR.

Comment thread main.go
Comment on lines +335 to +337
if err != nil {
continue
}

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.

We can add a log message similar to the unsupported group to leave a trace of unrecognized cipher suite.

@bentito bentito Aug 6, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yep, added in 4ce1511

Comment thread main.go
Comment on lines +345 to +347
if err != nil {
return nil, fmt.Errorf("invalid TLS version %q: %w", profileSpec.MinTLSVersion, err)
}

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.

How do we decide which of TLS settings are blocking like this minimal TLS version and which can be skipped like unrecognized ciphersuite of curves? Should we do the best effort here too and let the default (TLS1.2) be applied?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The distinction comes down to fail-closed vs. fail-safe negotiation:

  1. Fail-Closed for Protocol Versions: We cannot allow the metrics server to start up with a lower TLS protocol version than the global cluster policy specifies (e.g. falling back to TLS 1.2 when a strict TLS 1.3 profile is configured), as this would violate security compliance audits. Hence, an unrecognized protocol version must be a blocking startup error (fail-closed).
  2. Fail-Safe for Ciphers/Curves: Unrecognized cipher suites and elliptic curves can be safely skipped (logged as warnings) because the TLS handshake protocol natively negotiates only the overlapping set of supported parameters. This is a fail-safe negotiation.

Comment thread main.go
}
}

return libgocrypto.SecureTLSConfig(cfg), nil

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.

SecureTLSConfig will fill unset settings with defaults. This makes the defaults we set in this function (e.g. min tls version) redundant. Should we just let SecureTLSConfig handle the unfilled defaults?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed that it's technically redundant because SecureTLSConfig will populate the defaults. However, we explicitly initialize MinVersion inside the tls.Config declaration primarily to satisfy the gosec security linter (which flags any uninitialized or default TLS instantiation as G402: TLS MinVersion too low).

Comment thread main.go Outdated
// TLSGroupToCurveID converts a configv1.TLSGroup name to its crypto/tls
// CurveID. The second return value is false when the group is not supported
// by the Go runtime.
func TLSGroupToCurveID(group configv1.TLSGroup) (tls.CurveID, bool) {

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.

Do we really need this function to be an exported symbol? As a matter of fact I don't see the reason for its existance, simple map lookup (tlsGroupToCurveID[group]) gives the same result.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed. Made the map unexported, removed the wrapper function in favor of a direct map lookup, and aligned the warning casing in commit 4ce1511

Comment thread main.go Outdated
if id, ok := TLSGroupToCurveID(g); ok {
curves = append(curves, id)
} else {
setupLog.Info("Skipping unsupported TLS group", "group", g)

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.

To match other log messages:

Suggested change
setupLog.Info("Skipping unsupported TLS group", "group", g)
setupLog.Info("skipping unsupported TLS group", "group", g)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed. Aligned the log casing to match other messages in commit 4ce1511

Comment thread hack/generate-iam-from-credrequest.sh Outdated
EOF
${YQ_BIN} -i -o=json "${POLICY_FILE}"
sed -i -e 's/action/Action/g' -e 's/effect/Effect/g' -e 's/resource/Resource/g' "${POLICY_FILE}"
python3 -c "import sys; p = sys.argv[1]; text = open(p).read().replace('\"action\"', '\"Action\"').replace('\"effect\"', '\"Effect\"').replace('\"resource\"', '\"Resource\"'); open(p, 'w').write(text)" "${POLICY_FILE}"

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.

Is it just for a safer replacement? Or somehow related to the metrics change?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The original sed command was platform-dependent and failed silently on macOS, which left uncommitted lowercase keys (action/effect/resource) in our local IAM permission policy compared to Linux CI. The Python replacement is cross-platform, allowing successful local schema generation and keeping the repository in sync

@openshift-ci

openshift-ci Bot commented Aug 6, 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 alebedev87. 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

@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 `@hack/generate-iam-from-credrequest.sh`:
- Line 18: The inline Python transformation in the policy-generation command
must rename keys structurally rather than globally replacing text. Parse
POLICY_FILE as JSON, traverse each Statement object, and rename only its action,
effect, and resource fields to Action, Effect, and Resource while preserving
string values and unrelated nested objects; serialize the transformed policy
back to the same file.
🪄 Autofix

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: Pro Plus

Run ID: 87492459-6712-4cc1-93a2-c13d81b21ff1

📥 Commits

Reviewing files that changed from the base of the PR and between 5b48f30 and 24856d3.

📒 Files selected for processing (2)
  • hack/generate-iam-from-credrequest.sh
  • main.go

Comment thread hack/generate-iam-from-credrequest.sh Outdated
@bentito
bentito force-pushed the feature/NE-2739-native-metrics branch from b17c29f to 4ce1511 Compare August 6, 2026 18:09
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
Validation Failed: {"resource":"IssueComment","code":"custom","field":"body","message":"body is too long (maximum is 65536 characters)"} - https://docs.github.com/rest/issues/comments#update-an-issue-comment

@bentito

bentito commented Aug 6, 2026

Copy link
Copy Markdown
Author

Mostly LGTM. Some minor remarks and questions. One important thing I noticed though, ALBO doesn't add servicemointor so the metrics are not actually scraped. This is gap which we can address as a separate PR.

Agreed. Enabling the ServiceMonitor and wiring the Prometheus scraping permissions is a critical next step, but it is technically a separate task. I've tracked this follow-up work in the new Jira story: https://redhat.atlassian.net/browse/NE-2840, so we can address it in a dedicated PR. Thanks!

@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@bentito: 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/e2e-aws-rosa-operator 322397a link true /test e2e-aws-rosa-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.

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

Labels

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.

5 participants