feat: integrate with cluster TLS security profile - #824
Conversation
|
Hi @ugiordan. Thanks for your PR. I'm waiting for a trustyai-explainability member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds OpenShift TLS profile resolution with bounded lookup, fallback handling, cipher and protocol parsing, and applies the resulting TLS options to the EvalHub webhook server. ChangesTLS profile integration
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 `@cmd/main.go`:
- Around line 121-123: Update the ctrl.Options Metrics configuration to set
SecureServing: true alongside the existing TLSOpts, ensuring the resolved TLS
profile is applied to the metrics endpoint.
In `@pkg/tls/tls.go`:
- Around line 104-111: The Kubernetes error classification in the TLS fallback
handling must treat server-timeout responses as transient. Add
apierrors.IsServerTimeout(err) to the relevant condition alongside
apierrors.IsTimeout so it uses hardened defaults, and update the classification
tests to cover StatusReasonServerTimeout.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2d221508-8056-40bc-b18c-f5227851b36c
📒 Files selected for processing (8)
cmd/main.goconfig/rbac-base/kustomization.yamlconfig/rbac-base/tls_profile_role.yamlconfig/rbac-base/tls_profile_role_binding.yamlpkg/tls/tls.gopkg/tls/tls_test.gopolicy/clusterrole.regopolicy/rbac.rego
716ef6b to
29a3794
Compare
Applies TLSOpts to the EvalHub webhook server override that was previously missing them, and adds handling for context.DeadlineExceeded and apierrors.IsServerTimeout in the TLS profile resolution to prevent crash loops during transient API server issues. Signed-off-by: Ugo Giordano <ugiordan@redhat.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29a3794 to
5888729
Compare
|
@ruivieira can you please help with this one? |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ruivieira The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary
tls.openshift.io/v1alpha1) to configure TLS settings for the operator's metrics and webhook serversServiceUnavailable,Timeout,TooManyRequests,context.DeadlineExceeded)Test plan
Summary by CodeRabbit