Skip to content

WIP: use TLS groups/curve preferences from controller-runtime-common - #308

Open
damdo wants to merge 4 commits into
openshift:mainfrom
damdo:use-tls-groups-support
Open

WIP: use TLS groups/curve preferences from controller-runtime-common#308
damdo wants to merge 4 commits into
openshift:mainfrom
damdo:use-tls-groups-support

Conversation

@damdo

@damdo damdo commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Bump controller-runtime-common and library-go forks to pick up TLS groups/curve preferences support
  • Use NewTLSConfigFromProfile curve preferences in the cluster TLS profile path
  • Update log messages to mention groups alongside ciphers
  • Add --tls-curve-preferences CLI flag (numeric tls.CurveID values, matching k8s.io/component-base convention)

The --tls-curve-preferences flag uses cliflag.TLSCurvePreferences from k8s.io/component-base v0.36+. This won't compile until the k8s 1.36 dependency bump lands.

CPO (HyperShift) can leverage libgocrypto.CurveIDsForTLSGroups() from o/library-go to convert IANA TLS group names from o/api into numeric tls.CurveID values, and pass them to this flag on the CMA Deployment spec.

Dependencies

Test plan

  • Verify the feat commit compiles and passes existing tests
  • The WIP commit (--tls-curve-preferences) is expected to fail compilation until the k8s 1.36 bump
  • Once k8s 1.36 is bumped, verify --tls-curve-preferences 29,23 correctly sets CurvePreferences on the TLS config

Summary by CodeRabbit

  • New Features

    • Added configurable TLS curve preferences for secure server connections.
    • TLS configuration now applies curve preferences supplied through command-line settings.
    • Updated the runtime to use newer platform and security components.
  • Bug Fixes

    • Added validation with clear errors for invalid TLS curve preferences.
    • Improved TLS security profile logging to report unsupported cipher suites and elliptic curves.

@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 Jul 3, 2026
@openshift-ci

openshift-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

[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 mdbooth 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

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The module targets Go 1.26.0 and refreshes OpenShift dependencies. The application adds a TLS curve-preferences flag, validates curve IDs, applies them to server TLS configuration, and logs unsupported TLS groups.

Changes

TLS curve preference support

Layer / File(s) Summary
Dependency and module updates
go.mod
The module targets Go 1.26.0. OpenShift dependency revisions are updated. A replacement maps controller-runtime-common to a specified fork revision.
CLI and startup TLS wiring
main.go
The CLI stores numeric curve preferences, treats them as a TLS override, and passes them to TLS resolution with a cancellable 30-second startup context.
TLS resolution and validation
pkg/tls/tls.go, pkg/tls/tls_test.go
TLS resolution validates curve IDs and applies them to tls.Config.CurvePreferences. Cluster profile logging includes unsupported groups. Existing tests pass the expanded resolver argument list.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant main.go
  participant ResolveTLSConfig
  participant tls.Config
  CLI->>main.go: Provide TLS curve preferences
  main.go->>ResolveTLSConfig: Pass preferences with startup context
  ResolveTLSConfig->>tls.Config: Set CurvePreferences
Loading

Possibly related issues

  • openshift/controller-runtime-common#20 — Both changes add TLS curve-preference support, but this change handles CLI-provided curves while the issue wires profile groups into tls.Config.CurvePreferences.
🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning The Ginkgo TLS suite uses cluster API operations in Eventually without explicit timeouts and uses assertions without diagnostic messages. Add explicit timeout values to every cluster-related Eventually call and add meaningful messages to failure-prone assertions, including cleanup and setup.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: using TLS groups and curve preferences from controller-runtime-common.
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 The branch changes only ResolveTLSConfig arguments in pkg/tls/tls_test.go. All repository Ginkgo titles are static descriptive strings with no generated names, timestamps, namespaces, nodes, IPs, o...
Microshift Test Compatibility ✅ Passed The PR adds no Ginkgo test cases. It only updates existing pkg/tls/tls_test.go calls with a nil argument, so this MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds no Ginkgo e2e tests or new test files; pkg/tls/tls_test.go only updates existing ResolveTLSConfig calls with nil.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only TLS configuration, dependencies, tests, and vendored libraries; it adds no deployment manifests or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed PASS: This is a machine-approver controller, not an openshift-tests extension; production code has no stdout writes, and vendored klog defaults to stderr.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The aggregate diff adds no Ginkgo e2e tests; pkg/tls/tls_test.go only updates existing envtest calls with nil and adds no IPv4 assumptions or external connectivity.
No-Weak-Crypto ✅ Passed PR additions only validate/configure TLS CurveIDs and map modern groups; no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons were added.
Container-Privileges ✅ Passed The PR changes no manifests and adds no privileged, host namespace, SYS_ADMIN, root, or allowPrivilegeEscalation settings; both deployments require the restricted-v2 SCC.
No-Sensitive-Data-In-Logs ✅ Passed Changed logging reports only TLS cipher/group names; TLSProfileSpec contains ciphers, groups, and minimum version, with no passwords, tokens, PII, hostnames, or customer data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@go.mod`:
- Around line 133-136: Update the controller-runtime-common replace directive in
go.mod to reference an existing immutable commit in
github.com/damdo/controller-runtime-common or a released upstream version,
preserving the TLS support dependency and ensuring Go module resolution and go
mod verify succeed.
- Line 54: Upgrade the go.opentelemetry.io/otel dependency to at least v1.41.0
and go.opentelemetry.io/otel/sdk to at least v1.40.0, updating go.mod and go.sum
with the resulting module hashes. Ensure the SBOM and signed provenance
attestation record the exact upgraded versions and hashes.
- Around line 15-20: Update the go.mod dependency train to Kubernetes v0.36.0,
including the k8s.io modules shown, and update sigs.k8s.io/controller-runtime to
v0.24.0. Change the go directive to 1.26 while preserving the existing
dependency structure.

In `@main.go`:
- Around line 157-166: Create the signal-backed cancellable context before
calling ResolveTLSConfig, derive a finite startup-timeout context from it, and
pass that timeout context to pkgtls.ResolveTLSConfig instead of
context.Background(). Preserve the existing fatal error handling, and ensure
cancellation cleanup remains deferred for the created contexts.

In `@pkg/tls/tls.go`:
- Line 25: Update the Kubernetes dependency versions used by pkg/tls/tls.go so
k8s.io/component-base is v0.36 or later and provides
cliflag.TLSCurvePreferences; the import at pkg/tls/tls.go lines 25-25 and its
usage at lines 75-77 require no direct code change once the dependency versions
are aligned.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

Comment thread go.mod Outdated
Comment on lines +15 to +20
k8s.io/api v0.35.2
k8s.io/apimachinery v0.35.2
k8s.io/client-go v0.35.2
k8s.io/klog/v2 v2.140.0
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2
sigs.k8s.io/controller-runtime v0.23.3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

go list -m -f '{{.Path}} {{.Version}}' \
  k8s.io/api \
  k8s.io/apimachinery \
  k8s.io/client-go \
  k8s.io/component-base \
  sigs.k8s.io/controller-runtime

go doc k8s.io/component-base/cli/flag.TLSCurvePreferences

Repository: openshift/cluster-machine-approver

Length of output: 390


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- go.mod ---'
cat -n go.mod | sed -n '1,145p'

printf '%s\n' '--- relevant symbols and references ---'
rg -n --glob '*.go' --glob '*.mod' 'TLSCurvePreferences|controller-runtime|k8s.io/component-base|go 1\.' .

printf '%s\n' '--- module metadata from the Go proxy ---'
for module_version in \
  'k8s.io/component-base/@v/v0.35.2.mod' \
  'k8s.io/component-base/@v/v0.36.0.mod' \
  'sigs.k8s.io/controller-runtime/@v/v0.23.3.mod' \
  'sigs.k8s.io/controller-runtime/@v/v0.24.0.mod'
do
  printf '\n[%s]\n' "$module_version"
  curl --fail --silent --show-error "https://proxy.golang.org/$module_version" \
    | sed -n '1,45p'
done

printf '%s\n' '--- tagged source for TLSCurvePreferences ---'
for ref in v0.35.2 v0.36.0; do
  printf '\n[%s]\n' "$ref"
  curl --fail --silent --show-error \
    "https://raw.githubusercontent.com/kubernetes/kubernetes/$ref/staging/src/k8s.io/component-base/cli/flag/ciphers.go" \
    | rg -n -C 3 'TLSCurvePreferences' || true
done

Repository: openshift/cluster-machine-approver

Length of output: 50390


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- controller-runtime and Kubernetes module requirements ---'
for module_version in \
  'k8s.io/component-base/@v/v0.35.2.mod' \
  'k8s.io/component-base/@v/v0.36.0.mod' \
  'sigs.k8s.io/controller-runtime/@v/v0.23.3.mod' \
  'sigs.k8s.io/controller-runtime/@v/v0.24.0.mod'
do
  printf '\n[%s]\n' "$module_version"
  curl --fail --silent --show-error "https://proxy.golang.org/$module_version" \
    | awk 'NR <= 35'
done

printf '%s\n' '--- TLS implementation and module source state ---'
cat -n pkg/tls/tls.go | sed -n '55,90p'
rg -n 'TLSCurvePreferences' vendor/k8s.io/component-base vendor/k8s.io --glob '*.go' | head -20 || true

printf '%s\n' '--- API in Kubernetes v0.36 source ---'
for ref in v0.35.2 v0.36.0; do
  printf '\n[%s]\n' "$ref"
  for file in ciphers.go options.go flags.go; do
    url="https://raw.githubusercontent.com/kubernetes/kubernetes/$ref/staging/src/k8s.io/component-base/cli/flag/$file"
    body="$(curl --fail --silent --show-error "$url" 2>/dev/null || true)"
    if printf '%s' "$body" | rg -q 'TLSCurvePreferences'; then
      printf '%s\n' "$url"
      printf '%s\n' "$body" | rg -n -C 3 'TLSCurvePreferences'
    fi
  done
done

Repository: openshift/cluster-machine-approver

Length of output: 6433


Align the Kubernetes dependency train with TLSCurvePreferences.

k8s.io/component-base v0.35.2 does not provide cliflag.TLSCurvePreferences, so the current code does not compile. Update the Kubernetes modules to v0.36.0, update sigs.k8s.io/controller-runtime to v0.24.0, and set the go directive to 1.26.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` around lines 15 - 20, Update the go.mod dependency train to
Kubernetes v0.36.0, including the k8s.io modules shown, and update
sigs.k8s.io/controller-runtime to v0.24.0. Change the go directive to 1.26 while
preserving the existing dependency structure.

Source: MCP tools

Comment thread go.mod Outdated
github.com/x448/float16 v0.8.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
go.opentelemetry.io/otel v1.36.0 // indirect

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

govulncheck -show verbose ./...
go list -m -f '{{.Path}} {{.Version}}' \
  go.opentelemetry.io/otel \
  go.opentelemetry.io/otel/sdk

Repository: openshift/cluster-machine-approver

Length of output: 221


🏁 Script executed:

#!/bin/bash
set -u

echo '--- go.mod dependency context ---'
cat -n go.mod | sed -n '45,62p'

echo '--- module metadata ---'
if command -v go >/dev/null 2>&1; then
  go version
  go list -m -f '{{.Path}} {{.Version}}' \
    go.opentelemetry.io/otel \
    go.opentelemetry.io/otel/sdk
else
  echo 'go: unavailable'
fi

echo '--- OSV records ---'
python3 - <<'PY'
import json, urllib.request
for module in ("go.opentelemetry.io/otel", "go.opentelemetry.io/otel/sdk"):
    req = urllib.request.Request(
        "https://api.osv.dev/v1/query",
        data=json.dumps({"package": {"ecosystem": "Go", "name": module}}).encode(),
        headers={"Content-Type": "application/json"},
    )
    try:
        with urllib.request.urlopen(req, timeout=20) as r:
            data = json.load(r)
        print(module)
        for vuln in data.get("vulns", []):
            print(json.dumps({
                "id": vuln.get("id"),
                "summary": vuln.get("summary"),
                "affected": vuln.get("affected"),
                "references": vuln.get("references"),
            }, separators=(",", ":")))
    except Exception as exc:
        print(module, "OSV query failed:", repr(exc))
PY

Repository: openshift/cluster-machine-approver

Length of output: 1886


🌐 Web query:

OSV GO-2026-5506 go.opentelemetry.io/otel fixed v1.41.0

💡 Result:

GO-2026-5506 (also tracked as CVE-2026-29181 and GHSA-mh2q-q3fh-2475) is a vulnerability in go.opentelemetry.io/otel affecting versions from 1.36.0 up to, but not including, 1.41.0 [1][2][3][4]. The vulnerability involves the extraction of multi-value baggage headers [1][3]. In affected versions, the OpenTelemetry-Go library parsed each header field-value independently and aggregated members across values [3][4]. This behavior allowed an attacker to trigger excessive memory allocations and CPU consumption by sending many baggage header lines, even if each individual value complied with the 8192-byte per-value parse limit [3][4]. This effectively acted as a remote denial-of-service (DoS) amplification vector [3]. The issue was fixed in v1.41.0, which updated baggage handling in go.opentelemetry.io/otel/propagation and go.opentelemetry.io/otel/baggage to comply with W3C Baggage specification limits [5][6]. As part of this fix, the New and Parse functions now return partial baggage along with an error when limits are exceeded, and errors from baggage extraction are reported to the global error handler [5][6].

Citations:


🌐 Web query:

OSV GO-2026-4394 go.opentelemetry.io/otel/sdk fixed v1.40.0

💡 Result:

GO-2026-4394 (also identified as CVE-2026-24051 and GHSA-9h8m-3fm2-qjrq) is a security vulnerability in the OpenTelemetry Go SDK that allows for Arbitrary Code Execution (ACE) via PATH hijacking [1][2][3]. The vulnerability affects macOS/Darwin systems where the SDK's resource detection code in sdk/resource/host_id.go executes the ioreg system command using an untrusted search path [4][5]. By locally modifying the PATH environment variable, an attacker can cause the application to execute a malicious binary instead of the intended ioreg command [4][6]. The issue affects versions of go.opentelemetry.io/otel/sdk from v1.21.0 up to (but not including) v1.40.0 [1][7]. It was officially patched in release v1.40.0 [8][5]. Users of the affected versions are advised to upgrade to v1.40.0 or later to mitigate this risk [2][5].

Citations:


🏁 Script executed:

#!/bin/bash
set -u

echo '--- repository OpenTelemetry references ---'
rg -n -i --glob '!go.sum' --glob '!vendor/**' 'go\.opentelemetry\.io|opentelemetry|otel' . || true

echo '--- module checksums ---'
rg -n '^go\.opentelemetry\.io/(otel|otel/metric|otel/sdk|otel/trace)( |/)' go.sum || true

echo '--- module graph metadata ---'
if command -v go >/dev/null 2>&1; then
  go list -m -f '{{.Path}} {{.Version}} {{.Indirect}}' \
    go.opentelemetry.io/otel \
    go.opentelemetry.io/otel/metric \
    go.opentelemetry.io/otel/sdk \
    go.opentelemetry.io/otel/trace
else
  echo 'go: unavailable'
fi

Repository: openshift/cluster-machine-approver

Length of output: 2511


Upgrade the vulnerable OpenTelemetry modules before merging.

The indirect dependencies go.opentelemetry.io/otel v1.36.0 and go.opentelemetry.io/otel/sdk v1.36.0 fall within known vulnerable ranges. Upgrade the OpenTelemetry modules to compatible fixed releases (otel >=v1.41.0, sdk >=v1.40.0) and update go.sum. Include the exact versions and hashes in the SBOM and signed provenance attestation.

🧰 Tools
🪛 OSV Scanner (2.4.0)

[HIGH] 54-54: go.opentelemetry.io/otel 1.36.0: OpenTelemetry-Go: Multi-value baggage header extraction causes excessive allocations in go.opentelemetry.io/otel

(GO-2026-5506)


[HIGH] 54-54: go.opentelemetry.io/otel 1.36.0: OpenTelemetry-Go: multi-value baggage header extraction causes excessive allocations (remote dos amplification)

(GHSA-mh2q-q3fh-2475)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` at line 54, Upgrade the go.opentelemetry.io/otel dependency to at
least v1.41.0 and go.opentelemetry.io/otel/sdk to at least v1.40.0, updating
go.mod and go.sum with the resulting module hashes. Ensure the SBOM and signed
provenance attestation record the exact upgraded versions and hashes.

Sources: Path instructions, MCP tools, Linters/SAST tools

Comment thread go.mod Outdated
Comment thread main.go Outdated
Comment thread pkg/tls/tls.go
"fmt"

configv1 "github.com/openshift/api/config/v1"
utiltls "github.com/openshift/controller-runtime-common/pkg/tls"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C2 'controller-runtime-common|k8s.io/component-base|replace ' go.mod go.sum
rg -n -C2 'TLSCurvePreferences|NewTLSConfigFromProfile' pkg/tls/tls.go main.go

# Expected: a resolvable controller-runtime-common revision and a component-base
# version compatible with cliflag.TLSCurvePreferences.

Repository: openshift/cluster-machine-approver

Length of output: 3997


Use compatible dependency versions before merge.

controller-runtime-common resolves through the declared replacement. However, k8s.io/component-base is pinned to v0.35.2, while cliflag.TLSCurvePreferences requires v0.36 or later. Bump the Kubernetes dependencies or defer this API use.

🧰 Tools
🪛 golangci-lint (2.12.2)

[error] 25-25: could not import github.com/openshift/controller-runtime-common/pkg/tls (pkg/tls/tls.go:25:2: github.com/damdo/controller-runtime-common@v0.0.0-20260703112942-fc0245fff371: invalid version: unknown revision fc0245fff371)

(typecheck)

📍 Affects 1 file
  • pkg/tls/tls.go#L25-L25 (this comment)
  • pkg/tls/tls.go#L75-L77
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/tls/tls.go` at line 25, Update the Kubernetes dependency versions used by
pkg/tls/tls.go so k8s.io/component-base is v0.36 or later and provides
cliflag.TLSCurvePreferences; the import at pkg/tls/tls.go lines 25-25 and its
usage at lines 75-77 require no direct code change once the dependency versions
are aligned.

Source: Linters/SAST tools

@damdo
damdo force-pushed the use-tls-groups-support branch from fbcafc1 to 59771be Compare August 10, 2026 16:25
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
go.mod (1)

133-134: 🔒 Security & Privacy | 🔵 Trivial

Record the fork in release metadata.

The fork uses Apache-2.0. Its checksums are present, go mod verify passes, and OSV reports no advisories. Before release, record production approval and include the resolved commit and checksums in the SBOM and signed provenance attestation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` around lines 133 - 134, Record the approved controller-runtime-common
fork in the release metadata, including its resolved commit and Go module
checksums. Update the SBOM and signed provenance attestation for the dependency
referenced by the replace directive, and include production approval before
release.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/tls/tls.go`:
- Around line 75-80: Remove the obsolete Kubernetes-version TODO comments
immediately above the cliflag.TLSCurvePreferences call, leaving the existing
curve preference parsing and error handling unchanged.
- Around line 82-87: Update every ResolveTLSConfig call in pkg/tls/tls_test.go
to pass the fifth tlsCurvePreferences argument, then add coverage for valid,
ordered, duplicate, zero, out-of-range, and unsupported curve IDs plus
curve-only CLI input. Remove the stale TODO in ResolveTLSConfig-related code in
pkg/tls/tls.go, relying on k8s.io/component-base v0.36.2’s TLSCurvePreferences.
- Around line 51-54: Update every ResolveTLSConfig call site, especially the
twelve calls in tls_test.go, to pass the tlsCurvePreferences argument before
merging. Preserve each call’s existing values and supply the appropriate
curve-preferences value as the fifth argument.

---

Nitpick comments:
In `@go.mod`:
- Around line 133-134: Record the approved controller-runtime-common fork in the
release metadata, including its resolved commit and Go module checksums. Update
the SBOM and signed provenance attestation for the dependency referenced by the
replace directive, and include production approval before release.
🪄 Autofix

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: 2373a3e1-c2a4-4786-a0d8-263b642efbee

📥 Commits

Reviewing files that changed from the base of the PR and between cdf2735 and 59771be.

⛔ Files ignored due to path filters (57)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/openshift/api/config/v1/types_authentication.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_infrastructure.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_ingress.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_kmsencryption.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_criocredentialproviderconfigs-Hypershift.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_criocredentialproviderconfigs-SelfManagedHA.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-OKD.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_ingresses-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_ingresses-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_ingresses-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.model_name.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/features.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/register.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/types_ingress.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.model_name.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/route/v1/generated.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/route/v1/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/route/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformstatus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformstatus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpplatformstatus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformfailuredomainspec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformspec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorconfig.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectordevicemappermultipathconfig.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorzoneinfoconfig.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewritespec.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmsencryptionstatus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspluginhealthreport.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodestatus.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/controller-runtime-common/pkg/tls/tls.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/library-go/pkg/crypto/crypto.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/resource_cache.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (3)
  • go.mod
  • main.go
  • pkg/tls/tls.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • main.go

Comment thread pkg/tls/tls.go
Comment thread pkg/tls/tls.go Outdated
Comment thread pkg/tls/tls.go
@damdo
damdo force-pushed the use-tls-groups-support branch 2 times, most recently from 4640692 to 6d17d12 Compare August 10, 2026 16:55

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pkg/tls/tls_test.go (1)

38-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for non-empty curve preferences.

All updated calls in this file pass nil, so they do not exercise the new tlsCurvePreferences path in ResolveTLSConfig or verify tls.Config.CurvePreferences. Add a focused test with a non-empty []int32 and assert the applied curve preferences.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/tls/tls_test.go` at line 38, Add a focused test in tls_test.go that
invokes ResolveTLSConfig with a non-empty []int32 tlsCurvePreferences value and
asserts the resulting tls.Config.CurvePreferences matches the supplied curves,
covering the non-nil preference path while preserving existing nil-input tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pkg/tls/tls_test.go`:
- Line 38: Add a focused test in tls_test.go that invokes ResolveTLSConfig with
a non-empty []int32 tlsCurvePreferences value and asserts the resulting
tls.Config.CurvePreferences matches the supplied curves, covering the non-nil
preference path while preserving existing nil-input tests.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: ab72d880-1783-4870-a368-8d17fc453b34

📥 Commits

Reviewing files that changed from the base of the PR and between 4640692 and 6d17d12.

📒 Files selected for processing (1)
  • pkg/tls/tls_test.go

damdo added 4 commits August 10, 2026 19:00
Bump openshift/api, openshift/client-go, and openshift/library-go to
latest upstream master to pick up the TLS Groups field in TLSProfileSpec
and the TLSGroupsToCurveIDs function.

Add replace directive for controller-runtime-common fork that implements
curve preferences support (openshift/controller-runtime-common#22).

TODO: Remove the replace directive once the TLS groups/curve preferences
support is merged and released upstream in controller-runtime-common.
@damdo
damdo force-pushed the use-tls-groups-support branch from 6d17d12 to d816d37 Compare August 10, 2026 17:01
@damdo
damdo marked this pull request as ready for review August 11, 2026 08:52
@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@damdo: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-hypershift-aks d816d37 link true /test e2e-hypershift-aks

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant