Skip to content

OCPNODE-4114: Update TLSSecurityProfile doc to reflect CRI-O propagation and TLS 1.3 support#2747

Draft
asahay19 wants to merge 1 commit intoopenshift:masterfrom
asahay19:o/api
Draft

OCPNODE-4114: Update TLSSecurityProfile doc to reflect CRI-O propagation and TLS 1.3 support#2747
asahay19 wants to merge 1 commit intoopenshift:masterfrom
asahay19:o/api

Conversation

@asahay19
Copy link

@asahay19 asahay19 commented Mar 6, 2026

This PR is regarding updates in the KubeletConfigSpec.TLSSecurityProfile comment in machineconfiguration/v1/types.go to reflect two changes:

  1. The maximum available minTLSVersion is now VersionTLS13
  2. This field now affects both kubelet and CRI-O. The MCO ContainerRuntimeConfig controller propagates the TLS minimum version to CRI-O via a drop-in config file on matching nodes.

Related PRs:

…ion and TLS 1.3 support

Signed-off-by: Aditi Sahay <asahay@redhat.com>
@openshift-ci-robot
Copy link

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 6, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 6, 2026

Hello @asahay19! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 6, 2026

@asahay19: This pull request references OCPNODE-4114 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 "4.22.0" version, but no target version was set.

Details

In response to this:

This PR is regarding updates in the KubeletConfigSpec.TLSSecurityProfile comment in machineconfiguration/v1/types.go to reflect two changes:

  1. The maximum available minTLSVersion is now VersionTLS13
  2. This field now affects both kubelet and CRI-O. The MCO ContainerRuntimeConfig controller propagates the TLS minimum version to CRI-O via a drop-in config file on matching nodes.

Related PRs:

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.

@asahay19 asahay19 marked this pull request as draft March 6, 2026 13:36
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 6, 2026
@qodo-code-review
Copy link

Review Summary by Qodo

Update TLSSecurityProfile docs for TLS 1.3 and CRI-O support

📝 Documentation

Grey Divider

Walkthroughs

Description
• Update TLSSecurityProfile documentation to reflect VersionTLS13 support
• Document CRI-O propagation via ContainerRuntimeConfig controller
• Clarify TLS configuration applies to both kubelet and CRI-O
• Regenerate auto-generated files with updated documentation
Diagram
flowchart LR
  A["KubeletConfigSpec<br/>TLSSecurityProfile"] -->|"Updated docs"| B["Supports VersionTLS13<br/>max version"]
  A -->|"Propagates to"| C["Kubelet"]
  A -->|"Propagates to"| D["CRI-O via<br/>drop-in config"]
  D -->|"Managed by"| E["ContainerRuntimeConfig<br/>controller"]
Loading

Grey Divider

File Changes

1. machineconfiguration/v1/types.go 📝 Documentation +4/-1

Update TLSSecurityProfile documentation with TLS 1.3 support

• Updated TLSSecurityProfile comment to reflect VersionTLS13 as maximum minTLSVersion
• Added documentation explaining TLS configuration applies to both kubelet and CRI-O
• Documented CRI-O receives TLS version via drop-in config from ContainerRuntimeConfig controller

machineconfiguration/v1/types.go


2. machineconfiguration/v1/zz_generated.swagger_doc_generated.go 📝 Documentation +1/-1

Regenerate swagger docs for TLSSecurityProfile

• Regenerated swagger documentation to reflect updated TLSSecurityProfile comment
• Updated map_KubeletConfigSpec entry with new documentation text

machineconfiguration/v1/zz_generated.swagger_doc_generated.go


3. machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs.crd.yaml 📝 Documentation +4/-1

Update CRD manifest TLSSecurityProfile description

• Updated CRD manifest tlsSecurityProfile description field
• Reflects VersionTLS13 support and CRI-O propagation details

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs.crd.yaml


View more (2)
4. machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/AAA_ungated.yaml 📝 Documentation +4/-1

Update feature-gated CRD TLSSecurityProfile description

• Updated feature-gated CRD manifest tlsSecurityProfile description
• Synchronized with main CRD manifest changes

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/AAA_ungated.yaml


5. payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs.crd.yaml 📝 Documentation +4/-1

Update payload CRD TLSSecurityProfile description

• Updated payload CRD manifest tlsSecurityProfile description field
• Aligns with other CRD manifest updates

payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs.crd.yaml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link

qodo-code-review bot commented Mar 6, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. TLS profile docs contradict schema 🐞 Bug ✓ Correctness
Description
The updated TLSSecurityProfile comment says only Old/Intermediate profiles are supported while also
claiming the maximum minTLSVersion is VersionTLS13, which implies Modern/Custom (TLS 1.3) support.
This contradicts the underlying TLSSecurityProfile schema and the generated CRD enum (which allow
Modern/Custom and VersionTLS13), making the API documentation misleading and potentially causing
users to assume unsupported/unsupported behavior incorrectly.
Code

machineconfiguration/v1/types.go[R759-763]

	// Note that only Old and Intermediate profiles are currently supported, and
-	// the maximum available minTLSVersion is VersionTLS12.
+	// the maximum available minTLSVersion is VersionTLS13.
+	// When set, this TLS configuration is applied to both the kubelet and CRI-O
+	// on nodes matching the pool selector. CRI-O receives the minimum TLS version
+	// via a drop-in configuration file managed by the ContainerRuntimeConfig controller.
Evidence
KubeletConfigSpec docs state only Old/Intermediate profiles are supported, but both the config/v1
TLSSecurityProfile type and the KubeletConfig CRD schema explicitly allow Modern/Custom profile
types and VersionTLS13 as a valid MinTLSVersion. This makes the updated comment contradictory
(within itself and vs. the schema), so readers cannot reliably infer what is supported/propagated.

machineconfiguration/v1/types.go[758-765]
config/v1/types_tlssecurityprofile.go[3-22]
config/v1/types_tlssecurityprofile.go[167-186]
machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs.crd.yaml[226-244]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`KubeletConfigSpec.TLSSecurityProfile` docs are contradictory: they say only `Old`/`Intermediate` are supported, but also claim the max `minTLSVersion` is `VersionTLS13` (which implies `Modern`/`Custom`). This conflicts with the schema/CRD which allows `Modern`/`Custom` and `VersionTLS13`, and may mislead users.

### Issue Context
This PR is documentation-focused, so correctness/clarity of the API docstrings is the core deliverable. The CRD schema is broader than the current prose, so the prose must clearly state what the operator actually supports/propagates.

### Fix Focus Areas
- machineconfiguration/v1/types.go[758-765]
- machineconfiguration/v1/zz_generated.swagger_doc_generated.go[247-251]
- machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs.crd.yaml[111-117]
- machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/AAA_ungated.yaml[112-118]
- payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs.crd.yaml[111-117]

(After updating the source comment, re-run the repo’s generation scripts as appropriate so generated CRDs/swagger docs remain consistent.)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@openshift-ci openshift-ci bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 6, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

This pull request updates documentation for KubeletConfig TLS security settings. The maximum supported minTLSVersion is updated from VersionTLS12 to VersionTLS13 in both the Go type documentation and the Kubernetes CRD schema. The changes also add clarification that TLS security profile configuration applies to both the kubelet and CRI-O on nodes matching the pool selector, with CRI-O receiving the minimum TLS version through a drop-in configuration managed by the ContainerRuntimeConfig controller. No functional code modifications are introduced.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main changes: updating TLSSecurityProfile documentation to reflect CRI-O propagation and TLS 1.3 support, which directly matches the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining the two key updates to the TLSSecurityProfile comment: VersionTLS13 support and CRI-O propagation via MCO.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed This pull request does not modify any Ginkgo test files. The changes are limited to documentation comments in machineconfiguration/v1/types.go and field descriptions in the KubeletConfig CRD YAML file. Since the custom check targets Ginkgo test names and this PR contains no test files, the check is not applicable.
Test Structure And Quality ✅ Passed Pull request contains no Ginkgo test code or test files, only documentation and YAML manifest updates. Custom check for Ginkgo test quality is not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.5.0)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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 and usage tips.

@openshift-ci openshift-ci bot requested review from JoelSpeed and yuqi-zhang March 6, 2026 13:38
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 6, 2026

[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 assign deads2k 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

Comment on lines 759 to +763
// Note that only Old and Intermediate profiles are currently supported, and
// the maximum available minTLSVersion is VersionTLS12.
// the maximum available minTLSVersion is VersionTLS13.
// When set, this TLS configuration is applied to both the kubelet and CRI-O
// on nodes matching the pool selector. CRI-O receives the minimum TLS version
// via a drop-in configuration file managed by the ContainerRuntimeConfig controller.

Choose a reason for hiding this comment

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

Action required

1. Tls profile docs contradict schema 🐞 Bug ✓ Correctness

The updated TLSSecurityProfile comment says only Old/Intermediate profiles are supported while also
claiming the maximum minTLSVersion is VersionTLS13, which implies Modern/Custom (TLS 1.3) support.
This contradicts the underlying TLSSecurityProfile schema and the generated CRD enum (which allow
Modern/Custom and VersionTLS13), making the API documentation misleading and potentially causing
users to assume unsupported/unsupported behavior incorrectly.
Agent Prompt
### Issue description
`KubeletConfigSpec.TLSSecurityProfile` docs are contradictory: they say only `Old`/`Intermediate` are supported, but also claim the max `minTLSVersion` is `VersionTLS13` (which implies `Modern`/`Custom`). This conflicts with the schema/CRD which allows `Modern`/`Custom` and `VersionTLS13`, and may mislead users.

### Issue Context
This PR is documentation-focused, so correctness/clarity of the API docstrings is the core deliverable. The CRD schema is broader than the current prose, so the prose must clearly state what the operator actually supports/propagates.

### Fix Focus Areas
- machineconfiguration/v1/types.go[758-765]
- machineconfiguration/v1/zz_generated.swagger_doc_generated.go[247-251]
- machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs.crd.yaml[111-117]
- machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/AAA_ungated.yaml[112-118]
- payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs.crd.yaml[111-117]

(After updating the source comment, re-run the repo’s generation scripts as appropriate so generated CRDs/swagger docs remain consistent.)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link

@coderabbitai coderabbitai bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@machineconfiguration/v1/types.go`:
- Around line 760-763: Update the comment and mirrored CRD description around
the TLS profile and CRI-O propagation to clearly state that only Old and
Intermediate named profiles are supported for full TLS/profile config, that
VersionTLS13 is the highest allowed value for minTLSVersion, and that CRI-O only
receives the minimum TLS version (minTLSVersion) via a drop-in file managed by
the ContainerRuntimeConfig controller — it does NOT receive Modern or custom
profiles or custom cipher suites or other profile-specific settings; change text
near the minTLSVersion comment and the corresponding CRD description to
explicitly limit CRI-O propagation to minTLSVersion only and to warn that
Modern/custom profiles and cipher settings are not applied to CRI-O.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: d73d6300-f70b-4af8-8d70-2541ca57fc62

📥 Commits

Reviewing files that changed from the base of the PR and between ec7ab20 and e4e1f7e.

⛔ Files ignored due to path filters (3)
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_kubeletconfigs.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/kubeletconfigs.machineconfiguration.openshift.io/AAA_ungated.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.swagger_doc_generated.go is excluded by !**/zz_generated*
📒 Files selected for processing (2)
  • machineconfiguration/v1/types.go
  • payload-manifests/crds/0000_80_machine-config_01_kubeletconfigs.crd.yaml

Comment on lines +760 to +763
// the maximum available minTLSVersion is VersionTLS13.
// When set, this TLS configuration is applied to both the kubelet and CRI-O
// on nodes matching the pool selector. CRI-O receives the minimum TLS version
// via a drop-in configuration file managed by the ContainerRuntimeConfig controller.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify supported-profile scope and CRI-O propagation here.

Combined with the preceding sentence, this now reads inconsistently: it still says only Old/Intermediate are supported, but also advertises VersionTLS13 as the max minTLSVersion, and it says the TLS config applies to CRI-O even though the next sentence narrows that to only the minimum TLS version. Please tighten the wording so users do not infer that Modern/custom profiles or custom cipher settings are fully honored for CRI-O. This same text is mirrored into the generated CRD description, so update both in lockstep.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@machineconfiguration/v1/types.go` around lines 760 - 763, Update the comment
and mirrored CRD description around the TLS profile and CRI-O propagation to
clearly state that only Old and Intermediate named profiles are supported for
full TLS/profile config, that VersionTLS13 is the highest allowed value for
minTLSVersion, and that CRI-O only receives the minimum TLS version
(minTLSVersion) via a drop-in file managed by the ContainerRuntimeConfig
controller — it does NOT receive Modern or custom profiles or custom cipher
suites or other profile-specific settings; change text near the minTLSVersion
comment and the corresponding CRD description to explicitly limit CRI-O
propagation to minTLSVersion only and to warn that Modern/custom profiles and
cipher settings are not applied to CRI-O.

Copy link
Contributor

@bitoku bitoku left a comment

Choose a reason for hiding this comment

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

APIserver needs change mentioning apiserver config will affect kubletconfig and container runtime config when tls is not configured in kubelet config.

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants