Skip to content

CNTRLPLANE-3428: tls: add cluster-authentication-operator and operands to tested compo…#31208

Open
gangwgr wants to merge 1 commit into
openshift:mainfrom
gangwgr:auth-test
Open

CNTRLPLANE-3428: tls: add cluster-authentication-operator and operands to tested compo…#31208
gangwgr wants to merge 1 commit into
openshift:mainfrom
gangwgr:auth-test

Conversation

@gangwgr
Copy link
Copy Markdown
Contributor

@gangwgr gangwgr commented May 21, 2026

for https://github.com/openshift/cluster-authentication-operator/pull/892]

Add the authentication operator (openshift-authentication-operator) and its OAuth server operand (openshift-authentication) to all target lists: observedConfigTargets, configMapTargets, serviceTargets, clusterOperatorTargets, and deploymentRolloutTargets.

The authentication operator uses a non-standard ObservedConfig path (oauthServer.servingInfo instead of servingInfo). Add a servingInfoPath field to observedConfigTarget so testObservedConfig and verifyObservedConfigForTargets resolve the path dynamically, defaulting to ["servingInfo"] for all existing targets.

Summary by CodeRabbit

  • Tests
    • Expanded TLS observed-config test coverage for OpenShift authentication components.
    • Added validation of TLS settings (min TLS version and cipher suites) at configurable servingInfo paths.
    • Added checks for TLS ConfigMap injection, wire-level service behavior, deployment rollout stabilization, and cluster-operator stability for authentication-related targets.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

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: automatic mode

@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 May 21, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 21, 2026

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: c27dd0d5-9e56-44e2-bf4a-411bc4a95a78

📥 Commits

Reviewing files that changed from the base of the PR and between 743a603 and d953de8.

📒 Files selected for processing (1)
  • test/extended/tls/tls_observed_config.go

Walkthrough

Parameterize where TLS is read from ObservedConfig with a per-target servingInfoPath, add authentication-related test targets (ObservedConfig, ConfigMap, wire/service, deployment rollout, ClusterOperator), and update verification to read TLS fields from the configured path.

Changes

TLS ObservedConfig authentication extension

Layer / File(s) Summary
servingInfoPath field in observedConfigTarget
test/extended/tls/tls_observed_config.go
observedConfigTarget gains servingInfoPath (defaults to ["servingInfo"]) and observedConfigTargets entries are updated to set it explicitly (e.g., openshift-authentication-operatoroauthServer.servingInfo).
Authentication-related test targets
test/extended/tls/tls_observed_config.go
Adds openshift-authentication-operator to configMapTargets; extends serviceTargets and deploymentRolloutTargets with authentication components (marked management-cluster); adds authentication to ClusterOperator stability waits.
Update verification to use servingInfoPath
test/extended/tls/tls_observed_config.go
testObservedConfig and verifyObservedConfigForTargets now extract/assert minTLSVersion and cipherSuites from spec.observedConfig at each target's configured servingInfoPath rather than assuming a top-level servingInfo.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • openshift/origin#31160: Refactors the TLS observed-config test around typed target lists and observed-config reading; closely related structural changes.
  • openshift/origin#31194: Related changes to TLS observed-config verification and minTLSVersion derivation/validation.

Suggested labels

lgtm, verified

Suggested reviewers

  • kaleemsiddiqu
🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning New test tls_observed_config.go contains IPv4-hardcoded localhost (127.0.0.1) in port-forward readiness check that could fail on IPv6-only clusters if 'Forwarding from' isn't quickly detected. Replace IPv4-only fallback dial with dual-stack check: try both 127.0.0.1 and ::1, or use net.JoinHostPort() for proper IPv6 bracket formatting. Ensure port-forward readiness handles IPv6-only systems gracefully.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding cluster-authentication-operator and operands to tested components with TLS configuration.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 All test names are stable and deterministic. They use only hardcoded namespace and port values from target lists, never random/generated identifiers, timestamps, or dynamic values.
Test Structure And Quality ✅ Passed Tests meet requirements: single responsibility per test, all assertions with messages, proper timeouts, cleanup via DeferCleanup, BeforeEach setup.
Microshift Test Compatibility ✅ Passed All Ginkgo tests in tls_observed_config.go are wrapped in Describe blocks with BeforeEach hooks that call exutil.IsMicroShiftCluster() and skip tests on MicroShift.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Tests verify TLS configuration without explicit multi-node assumptions (no pod distribution, failover, or rescheduling checks). Logic is SNO-compatible despite lacking label protections.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies test infrastructure only, not deployment manifests or operator code with scheduling constraints.
Ote Binary Stdout Contract ✅ Passed File contains no process-level stdout writes. No main(), init(), TestMain(), BeforeSuite(), or top-level var initializers produce stdout. All output code is properly scoped within Ginkgo test blocks.

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

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

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 21, 2026
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.

🧹 Nitpick comments (1)
test/extended/tls/tls_observed_config.go (1)

836-836: ⚡ Quick win

Use siLabel instead of hardcoded "servingInfo" for log consistency.

Line 829 correctly uses siLabel when logging minTLSVersion, but this line hardcodes "servingInfo". For the authentication operator (which uses path ["oauthServer", "servingInfo"]), the logs would inconsistently show "oauthServer.servingInfo" for minTLSVersion but just "servingInfo" for cipherSuites.

Suggested fix
-	e2e.Logf("ObservedConfig servingInfo.cipherSuites: %d suites", len(cipherSuites))
+	e2e.Logf("ObservedConfig %s.cipherSuites: %d suites", siLabel, len(cipherSuites))
🤖 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 `@test/extended/tls/tls_observed_config.go` at line 836, Replace the hardcoded
"servingInfo" string in the e2e.Logf call with the siLabel variable to keep log
labels consistent (the line containing e2e.Logf("ObservedConfig
servingInfo.cipherSuites: %d suites", len(cipherSuites))). Update the call to
use siLabel so it matches the earlier log of minTLSVersion and reflects the full
path (e.g., "oauthServer.servingInfo") dynamically.
🤖 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 `@test/extended/tls/tls_observed_config.go`:
- Line 836: Replace the hardcoded "servingInfo" string in the e2e.Logf call with
the siLabel variable to keep log labels consistent (the line containing
e2e.Logf("ObservedConfig servingInfo.cipherSuites: %d suites",
len(cipherSuites))). Update the call to use siLabel so it matches the earlier
log of minTLSVersion and reflects the full path (e.g.,
"oauthServer.servingInfo") dynamically.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: f0d298ae-4ee8-49e1-9cb9-7db47797c99f

📥 Commits

Reviewing files that changed from the base of the PR and between 50759b5 and 743a603.

📒 Files selected for processing (1)
  • test/extended/tls/tls_observed_config.go

@openshift-ci openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label May 21, 2026
@gangwgr
Copy link
Copy Markdown
Contributor Author

gangwgr commented May 21, 2026

/test tls-observed-config-hypershift
/test tls-observed-config

@gangwgr
Copy link
Copy Markdown
Contributor Author

gangwgr commented May 21, 2026

/test tls-observed-config-hypershift
/test tls-observed-config

@gangwgr
Copy link
Copy Markdown
Contributor Author

gangwgr commented May 22, 2026

/test tls-observed-config

@gangwgr gangwgr marked this pull request as ready for review May 25, 2026 06:58
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 25, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@gangwgr
Copy link
Copy Markdown
Contributor Author

gangwgr commented May 25, 2026

/test e2e-aws-ovn-serial-1of2

@gangwgr
Copy link
Copy Markdown
Contributor Author

gangwgr commented May 25, 2026

/verified by ci runs

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

@gangwgr: This PR has been marked as verified by ci runs.

Details

In response to this:

/verified by ci runs

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.

@gangwgr gangwgr changed the title tls: add cluster-authentication-operator and operands to tested compo… CNTRLPLANE-3428: tls: add cluster-authentication-operator and operands to tested compo… May 25, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 25, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 25, 2026

@gangwgr: This pull request references CNTRLPLANE-3428 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:

for https://github.com/openshift/cluster-authentication-operator/pull/892]

Add the authentication operator (openshift-authentication-operator) and its OAuth server operand (openshift-authentication) to all target lists: observedConfigTargets, configMapTargets, serviceTargets, clusterOperatorTargets, and deploymentRolloutTargets.

The authentication operator uses a non-standard ObservedConfig path (oauthServer.servingInfo instead of servingInfo). Add a servingInfoPath field to observedConfigTarget so testObservedConfig and verifyObservedConfigForTargets resolve the path dynamically, defaulting to ["servingInfo"] for all existing targets.

Summary by CodeRabbit

  • Tests
  • Extended TLS observed-config test coverage for OpenShift authentication-related operators and components.
  • Enhanced ObservedConfig verification logic configurability for servingInfo JSON paths.

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.

@sandeepknd
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2026
namespace string
operatorConfigGVR schema.GroupVersionResource
operatorConfigName string
servingInfoPath []string // default: ["servingInfo"]
Copy link
Copy Markdown
Member

@ingvagabund ingvagabund May 25, 2026

Choose a reason for hiding this comment

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

Why not set the path explicitly instead of defaulting? Right now the defaulting is set at two different places. Which is not a good coding pattern.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I doesn't want to impact old namespace, that's why added it
now I have updated pr

@ingvagabund
Copy link
Copy Markdown
Member

ingvagabund commented May 25, 2026

Looks like this PR got automatically approved without approving it?
/hold
Just to be sure

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 25, 2026
@ingvagabund
Copy link
Copy Markdown
Member

Was the PR approved by coderabbitai?

@gangwgr
Copy link
Copy Markdown
Contributor Author

gangwgr commented May 25, 2026

/coderabbitai review

@gangwgr
Copy link
Copy Markdown
Contributor Author

gangwgr commented May 25, 2026

Was the PR approved by coderabbitai?

CodeRabbit
CodeRabbit — Review completed

…nents

Add the authentication operator (openshift-authentication-operator) and
its OAuth server operand (openshift-authentication) to all target lists:
observedConfigTargets, configMapTargets, serviceTargets,
clusterOperatorTargets, and deploymentRolloutTargets.

The authentication operator uses a non-standard ObservedConfig path
(oauthServer.servingInfo instead of servingInfo). Add a servingInfoPath
field to observedConfigTarget so testObservedConfig and
verifyObservedConfigForTargets resolve the path dynamically, defaulting
to ["servingInfo"] for all existing targets.
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label May 25, 2026
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label May 25, 2026
@ingvagabund
Copy link
Copy Markdown
Member

/lgtm

@ingvagabund
Copy link
Copy Markdown
Member

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 25, 2026
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 25, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gangwgr, ingvagabund, sandeepknd

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

@ingvagabund
Copy link
Copy Markdown
Member

Was the PR approved by coderabbitai?

CodeRabbit
CodeRabbit — Review completed

I am sorry. Is that yes or no? If coderabbitai can approve a PR I don't think I like it without knowing which rules it follows.

@ingvagabund
Copy link
Copy Markdown
Member

Oh, @gangwgr I see now. Because you are approver under https://github.com/openshift/origin/blob/main/test/extended/tls/OWNERS the PR got automatically self-approved. Perhaps, good to update the config as in https://github.com/openshift/release/pull/78243/files.

@gangwgr
Copy link
Copy Markdown
Contributor Author

gangwgr commented May 25, 2026

/test tls-observed-config-hypershift
/test tls-observed-config

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 25, 2026

@gangwgr: 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-gcp-csi d953de8 link true /test e2e-gcp-csi

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

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. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants