Integrate central TLS profile via controller-runtime-common - #181
Conversation
Read the cluster's APIServer TLS profile at startup and apply it to the metrics and webhook servers. A SecurityProfileWatcher restarts the manager when the profile changes at runtime. Non-OpenShift clusters fall back to default TLS settings. Also bumps controller-runtime to v0.24.1, k8s libraries to v0.36.2, and migrates the webhook validator to the typed generic API. Signed-off-by: JonahSussman <sussmanjonah@gmail.com>
|
Hi @JonahSussman. Thanks for your PR. I'm waiting for a medik8s member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. 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. |
|
Important Review skippedToo many files! This PR contains 2191 files, which is 2091 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (78)
📒 Files selected for processing (2446)
You can disable this status message by setting the |
The operator now supports centralized TLS profiles, so the features.operators.openshift.io/tls-profiles annotation should reflect that. Signed-off-by: JonahSussman <sussmanjonah@gmail.com>
|
/ok-to-test |
|
@pranavgaikwad please review |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eemcmullan, JonahSussman, pranavgaikwad The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adds support for reading the cluster's centrally configured TLS profile from the APIServer CR and applying it to the metrics and webhook servers, enabling compliance with cluster-wide TLS policies. Follows the same pattern established in FAR PR #214.
What this PR does
Fetches the TLS profile at startup using
openshifttls.FetchAPIServerTLSProfilefromcontroller-runtime-common. On non-OpenShift clusters, falls back to default TLS settings gracefully.Applies the TLS profile to the metrics and webhook servers via
openshifttls.NewTLSConfigFromProfile, which configuresMinVersionandCipherSuitesbased on the cluster's TLS security profile (e.g.Old,Intermediate,Modern, orCustom).Watches for runtime TLS profile changes using
openshifttls.SecurityProfileWatcher. If the admin changes the TLS profile on a running cluster, the manager restarts to pick up the new settings.Adds RBAC for
get/list/watchonconfig.openshift.io/apiservers.Migrates webhook validator to typed generic API —
NewWebhookManagedBynow takes the concrete type, andValidator[*NodeMaintenance]replaces the untypedCustomValidatorinterface.Sets
tls-profilesOLM annotation to"true"in the Makefile bundle target to declare TLS profile support.Dependency bumps
sigs.k8s.io/controller-runtime: v0.22.5 -> v0.24.1k8s.io/api,k8s.io/apimachinery,k8s.io/client-go: v0.34.7 -> v0.36.2k8s.io/kubectl: v0.34.7 -> v0.36.2github.com/openshift/api: updated to latestgithub.com/openshift/controller-runtime-common: added (new dependency)Testing
operator-sdk bundle validateRelated