Skip to content

[WIP] CMP-4310 added dynamic TLS settings#3190

Draft
vickeybrown wants to merge 1 commit into
kubernetes-sigs:mainfrom
vickeybrown:CMP-3991-tls
Draft

[WIP] CMP-4310 added dynamic TLS settings#3190
vickeybrown wants to merge 1 commit into
kubernetes-sigs:mainfrom
vickeybrown:CMP-3991-tls

Conversation

@vickeybrown
Copy link
Copy Markdown

@vickeybrown vickeybrown commented May 14, 2026

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR adds support for dynamic TLS configuration from the OpenShift cluster
API server, making the security-profiles-operator respect cluster-wide TLS
policies instead of using hardcoded settings.

Key changes:

  • Fetches TLS configuration (cipher suites, minimum TLS version) from the
    OpenShift APIServer resource at startup
  • Respects the cluster's TLS adherence policy to determine whether to honor
    cluster TLS settings
  • Implements a TLS profile watcher that triggers graceful operator shutdown
    when TLS configuration changes, allowing Kubernetes to restart the pod with
    updated settings

This aligns the security-profiles-operator with OpenShift's cluster-wide
security policies and enables centralized TLS management.

Which issue(s) this PR fixes:

Fixes CMP-4310

Does this PR have test?

N/A

Special notes for your reviewer:

  • The operator now requires get, list, and watch permissions on
    config.openshift.io/apiservers resources (RBAC changes included in
    deploy/base/role.yaml)
    • When TLS configuration changes are detected, the operator performs a
      graceful shutdown expecting Kubernetes to restart the pod with the new
      configuration
    • HTTP/2 is disabled by default for security reasons
    • Falls back to safe defaults if the APIServer TLS profile cannot be fetched

Does this PR introduce a user-facing change?

The `--tls-min-version` flag has been removed from the
  security-profiles-operator. TLS configuration (minimum version and cipher     
  suites) is now dynamically fetched from the OpenShift cluster's APIServer
  resource and automatically updated when the cluster TLS policy changes. 

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels May 14, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vickeybrown
Once this PR has been reviewed and has the lgtm label, please assign jaormx for approval. 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

@k8s-ci-robot k8s-ci-robot requested a review from Vincent056 May 14, 2026 20:22
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 14, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: vickeybrown / name: Vickey Brown (4c2334b)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label May 14, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @vickeybrown!

It looks like this is your first PR to kubernetes-sigs/security-profiles-operator 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/security-profiles-operator has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 14, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @vickeybrown. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 14, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 14, 2026

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.74%. Comparing base (11d77f4) to head (37ea514).
⚠️ Report is 1152 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3190       +/-   ##
===========================================
- Coverage   45.50%   24.74%   -20.77%     
===========================================
  Files          79      128       +49     
  Lines        7782    17962    +10180     
===========================================
+ Hits         3541     4444      +903     
- Misses       4099    13223     +9124     
- Partials      142      295      +153     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 14, 2026
@vickeybrown vickeybrown force-pushed the CMP-3991-tls branch 4 times, most recently from 4f1b3fb to af431c6 Compare May 20, 2026 18:51
@vickeybrown vickeybrown changed the title [WIP] CMP-3991 added dynamic TLS settings [WIP] CMP-4310 added dynamic TLS settings May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants