feat: integrate with cluster TLS security profile#4931
Open
ugiordan wants to merge 1 commit into
Open
Conversation
5ff3ccc to
c13d4c4
Compare
c13d4c4 to
e2e3932
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit e2e3932. Configure here.
5bc436d to
456dc60
Compare
Read the cluster TLS profile from apiservers.config.openshift.io/cluster at startup via pkg/tls.Resolve(). Apply MinVersion, CipherSuites, and NextProtos to metrics server TLS config. Fail closed on unexpected errors. Use Intermediate defaults on non-OpenShift clusters. Signed-off-by: Ugo Giordano <ugiordan@redhat.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ugo Giordano <ugiordan@redhat.com>
456dc60 to
7342c58
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
apiservers.config.openshift.io/clusterat startupray-operator/pkg/tls/using typedconfigv1.APIServerobjects (openshift/api already a dependency)config.openshift.io/apiservers(get/list/watch)Motivation
OCP 5.0 requires all components to honor the centralized TLS profile. The kuberay operator already imports openshift/api (for routes). This PR extends that to also read the cluster TLS security posture, ensuring the operator's metrics endpoint uses the correct TLS version and cipher suites configured by the cluster admin.
On non-OpenShift clusters, the code gracefully falls back to hardened defaults (TLS 1.2, Intermediate cipher set).
Reference: openshift/cluster-machine-approver #286
Test plan
go build ./...passesgo test ./pkg/tls/... -vpasses (9 table-driven tests)make manifestsregenerated RBAC