Skip to content

OCPCLOUD-3359: Add TLS substitutions#408

Merged
openshift-merge-bot[bot] merged 2 commits intoopenshift:mainfrom
openshift-cloud-team:OCPCLOUD-3359
May 5, 2026
Merged

OCPCLOUD-3359: Add TLS substitutions#408
openshift-merge-bot[bot] merged 2 commits intoopenshift:mainfrom
openshift-cloud-team:OCPCLOUD-3359

Conversation

@mdbooth
Copy link
Copy Markdown

@mdbooth mdbooth commented Apr 29, 2026

Summary by CodeRabbit

  • New Features
    • Controller manager TLS options are now configurable: set the minimum TLS protocol version and cipher suites at runtime via environment-variable substitutions to control encryption settings.

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

openshift-ci-robot commented Apr 29, 2026

@mdbooth: This pull request references OCPCLOUD-3359 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 "5.0.0" version, but no target version was set.

Details

In response to this:

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 69967ec3-56e5-4563-b99f-009765fb4004

📥 Commits

Reviewing files that changed from the base of the PR and between dbaed29 and 38715ab.

📒 Files selected for processing (2)
  • openshift/capi-operator-manifests/default/manifests.yaml
  • openshift/kustomization.yaml
✅ Files skipped from review due to trivial changes (1)
  • openshift/kustomization.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • openshift/capi-operator-manifests/default/manifests.yaml

Walkthrough

Adds two TLS-related command-line arguments (--tls-min-version, --tls-cipher-suites) to the capo-controller-manager container, with values parameterized via ${TLS_MIN_VERSION} and ${TLS_CIPHER_SUITES} through manifest and Kustomize patch updates.

Changes

Cohort / File(s) Summary
Controller manager manifest
openshift/capi-operator-manifests/default/manifests.yaml
Appends --tls-min-version=${TLS_MIN_VERSION} and --tls-cipher-suites=${TLS_CIPHER_SUITES} to the capo-controller-manager container args.
Kustomize patch
openshift/kustomization.yaml
Adds a JSON6902 patch targeting the capo-controller-manager Deployment to inject the two TLS args into the first container's args array using Kustomize substitutions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding TLS substitutions to the configuration, as evidenced by the two files modified to include TLS-related environment variable substitutions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Pull request modifies only Kubernetes manifest and Kustomize configuration files with TLS flag additions. No Ginkgo test files are included in the changes.
Test Structure And Quality ✅ Passed PR contains only YAML configuration changes to OpenShift manifests without any Ginkgo test code, making the custom test quality check not applicable.
Microshift Test Compatibility ✅ Passed This PR modifies only manifest and Kustomize configuration files for TLS settings, adding no new Ginkgo e2e tests.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This pull request does not add any new Ginkgo e2e tests. The changes consist solely of modifications to YAML configuration files to add TLS configuration arguments to the capo-controller-manager deployment. Since the custom check specifically evaluates new Ginkgo e2e tests for Single Node OpenShift compatibility, and no tests are being added in this PR, the check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The PR adds only TLS configuration arguments to the capo-controller-manager Deployment with no scheduling constraints introduced.
Ote Binary Stdout Contract ✅ Passed PR contains only YAML and Kustomize manifest changes with no modifications to Go source code, test code, or process-level logging, making the OTE Binary Stdout Contract check not applicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This custom check is not applicable to this pull request. The PR only modifies YAML manifest and Kustomize configuration files to add TLS substitutions to the capo-controller-manager Deployment. No new Ginkgo e2e tests are being added, which is the prerequisite condition for applying this check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Review rate limit: 5/10 reviews remaining, refill in 27 minutes and 23 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from gryf and stephenfin April 29, 2026 10:46
Copy link
Copy Markdown

@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 `@openshift/capi-operator-manifests/default/manifests.yaml`:
- Around line 9128-9129: The flags --tls-min-version and --tls-cipher-suites are
using unsubstituted variables TLS_MIN_VERSION and TLS_CIPHER_SUITES which can
leave literal tokens at startup; update the manifest to provide safe defaults
using the shell-style default syntax (e.g., change
--tls-min-version=${TLS_MIN_VERSION} to
--tls-min-version=${TLS_MIN_VERSION:=VersionTLS13} and set a sensible default
list for --tls-cipher-suites like
${TLS_CIPHER_SUITES:="TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384"}) or
alternatively add documentation/comments marking TLS_MIN_VERSION and
TLS_CIPHER_SUITES as required variables so the operator always supplies them;
locate and edit the manager container args that contain --tls-min-version and
--tls-cipher-suites to apply this change.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4b27a67f-1b5d-4dfb-9df2-ffabbe360d02

📥 Commits

Reviewing files that changed from the base of the PR and between 74cb5b0 and dbaed29.

📒 Files selected for processing (2)
  • openshift/capi-operator-manifests/default/manifests.yaml
  • openshift/kustomization.yaml

Comment on lines +9128 to +9129
- --tls-min-version=${TLS_MIN_VERSION}
- --tls-cipher-suites=${TLS_CIPHER_SUITES}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Find all references to TLS substitution variables =="
rg -n -C2 '\bTLS_MIN_VERSION\b|\bTLS_CIPHER_SUITES\b'

echo
echo "== Find manifest args using these substitutions =="
rg -n -C2 -- '--tls-min-version|--tls-cipher-suites'

echo
echo "== Find kustomize/env substitution sources (common patterns) =="
rg -n -C2 'replacements:|vars:|configMapGenerator:|env:|substitution|TLS_MIN_VERSION|TLS_CIPHER_SUITES'

Repository: openshift/cluster-api-provider-openstack

Length of output: 50397


🏁 Script executed:

# Search for where TLS_MIN_VERSION and TLS_CIPHER_SUITES are DEFINED/ASSIGNED
echo "=== Searching for variable assignments ==="
rg -n 'TLS_MIN_VERSION\s*[:=]|TLS_CIPHER_SUITES\s*[:=]' --type yaml --type sh

echo
echo "=== Checking for env file sources ==="
fd -e env -e 'env.*' | head -20

echo
echo "=== Checking openshift directory structure ==="
ls -la openshift/ 2>/dev/null | head -20

echo
echo "=== Looking at openshift/kustomization.yaml in full context ==="
head -50 openshift/kustomization.yaml

echo
echo "=== Checking for vars or similar patterns in kustomization ==="
rg -n 'vars:|commonLabels:|commonAnnotations:|configMapGenerator:|secretGenerator:' openshift/ -A 3

Repository: openshift/cluster-api-provider-openstack

Length of output: 2713


🏁 Script executed:

# Check for any validation scripts or documentation
echo "=== Searching for documentation/comments about TLS variables ==="
rg -n 'TLS_MIN_VERSION|TLS_CIPHER_SUITES' --type md --type txt --type sh

echo
echo "=== Checking Makefile for variable initialization ==="
cat openshift/Makefile

echo
echo "=== Checking if manifests.yaml has any default values ==="
sed -n '9120,9135p' openshift/capi-operator-manifests/default/manifests.yaml

echo
echo "=== Searching for any default TLS values in config ==="
rg -n 'tls-min-version|tls-cipher-suites' config/ 2>/dev/null | head -20

Repository: openshift/cluster-api-provider-openstack

Length of output: 1939


Add default TLS values to prevent deployment failures from unresolved substitution.

Lines 9128-9129 lack default values, unlike the pattern used for feature gates on line 9127 (${EXP_CAPO_PRIORITY_QUEUE:=false}). Without defaults, if the cluster-capi-operator tool fails to substitute ${TLS_MIN_VERSION} and ${TLS_CIPHER_SUITES}, the manager will start with literal unresolved tokens as flag values, causing startup failures. Either:

  • Add defaults using the ${VAR:=default} syntax (e.g., --tls-min-version=${TLS_MIN_VERSION:=VersionTLS13}), or
  • Document these as required variables that must always be provided by the operator.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@openshift/capi-operator-manifests/default/manifests.yaml` around lines 9128 -
9129, The flags --tls-min-version and --tls-cipher-suites are using
unsubstituted variables TLS_MIN_VERSION and TLS_CIPHER_SUITES which can leave
literal tokens at startup; update the manifest to provide safe defaults using
the shell-style default syntax (e.g., change
--tls-min-version=${TLS_MIN_VERSION} to
--tls-min-version=${TLS_MIN_VERSION:=VersionTLS13} and set a sensible default
list for --tls-cipher-suites like
${TLS_CIPHER_SUITES:="TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384"}) or
alternatively add documentation/comments marking TLS_MIN_VERSION and
TLS_CIPHER_SUITES as required variables so the operator always supplies them;
locate and edit the manager container args that contain --tls-min-version and
--tls-cipher-suites to apply this change.

mdbooth and others added 2 commits April 29, 2026 13:55
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@mandre mandre left a comment

Choose a reason for hiding this comment

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

Seems fine to me on principle.

/approve

patch: |-
- op: add
path: /spec/template/spec/containers/0/args/-
value: "--tls-min-version=${TLS_MIN_VERSION}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we add default values, or do we expect cluster-capi-operator to always set a value?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

CAPIO will always set a value. This is part of the new requirements around PQC, and uses the cluster-wide TLS configuration.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 30, 2026
@damdo
Copy link
Copy Markdown
Member

damdo commented May 4, 2026

I can see the TLS substitutions being set on the CAPO Deployment.

[~] $ curl -sSL https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-api-provider-openstack/408/pull-ci-openshift-cluster-api-provider-openstack-main-e2e-openstack-capi-techpreview/2049440227226816512/artifacts/e2e-openstack-capi-techpreview/gather-extra/artifacts/deployments.json | jq '.items[] | select(.metadata.name == "capo-controller-manager") | .spec.template.spec.containers[0].args' | grep tls
  "--tls-min-version=VersionTLS12",
  "--tls-cipher-suites=TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"

/verified by @damdo

@openshift-ci-robot
Copy link
Copy Markdown

@damdo: Jira verification commands are restricted to collaborators for this repo.

Details

In response to this:

I can see the TLS substitutions being set on the CAPO Deployment.

[~] $ curl -sSL https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-api-provider-openstack/408/pull-ci-openshift-cluster-api-provider-openstack-main-e2e-openstack-capi-techpreview/2049440227226816512/artifacts/e2e-openstack-capi-techpreview/gather-extra/artifacts/deployments.json | jq '.items[] | select(.metadata.name == "capo-controller-manager") | .spec.template.spec.containers[0].args' | grep tls
 "--tls-min-version=VersionTLS12",
 "--tls-cipher-suites=TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"

/verified by @damdo

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.

Copy link
Copy Markdown
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 4, 2026

@damdo: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

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.

@damdo
Copy link
Copy Markdown
Member

damdo commented May 4, 2026

@mandre @stephenfin I added the verified & lgtm, but it appears I'm not allowed to do that, could you add it if you are happy? Thanks!

@mandre
Copy link
Copy Markdown
Member

mandre commented May 4, 2026

/lgtm
/approve
/verified by @damdo

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 4, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@mandre: This PR has been marked as verified by @damdo.

Details

In response to this:

/lgtm
/approve
/verified by @damdo

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.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 4, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 4, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mandre

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@openshift-merge-bot
Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD f5c97e0 and 2 for PR HEAD 38715ab in total

@mandre
Copy link
Copy Markdown
Member

mandre commented May 5, 2026

/override ci/prow/e2e-hypershift

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 5, 2026

@mandre: Overrode contexts on behalf of mandre: ci/prow/e2e-hypershift

Details

In response to this:

/override ci/prow/e2e-hypershift

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.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 5, 2026

@mdbooth: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit c63a204 into openshift:main May 5, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants