Skip to content

Add TLS strict-adherence and PQC-readiness scanner jobs for ocp-release-operator-sdk and ansible-operator-plugins - #83172

Open
mytreya-rh wants to merge 2 commits into
openshift:mainfrom
mytreya-rh:tls-scanner-sdk-operators
Open

Add TLS strict-adherence and PQC-readiness scanner jobs for ocp-release-operator-sdk and ansible-operator-plugins#83172
mytreya-rh wants to merge 2 commits into
openshift:mainfrom
mytreya-rh:tls-scanner-sdk-operators

Conversation

@mytreya-rh

@mytreya-rh mytreya-rh commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds TLS 1.3 strict-adherence and post-quantum-cryptography (PQC) readiness scanner jobs for openshift/ocp-release-operator-sdk and openshift/ansible-operator-plugins, mirroring the tls13-adherence / tls-pqc-readiness (+ -periodic) pattern already used by oadp-operator, machine-config-operator, and the CSI driver operators.

For each repo, this adds 4 tests:

  • tls13-adherence (presubmit, optional: true, always_run: false — triggerable via /test tls13-adherence): sets the cluster TLS profile to Modern with strict TLS adherence (TLS_13_ENABLE_TLS_ADHERENCE: "true", policy StrictAllComponents), then scans the deployed sample operator's namespace.
  • tls13-adherence-periodic (weekly cron): same as above, runs automatically.
  • tls-pqc-readiness (presubmit, optional: true, always_run: false — triggerable via /test tls-pqc-readiness): scans the deployed sample operator's namespace with PQC_CHECK: "true" (checks TLS 1.3 + mlkem/mlkem25519 support).
  • tls-pqc-readiness-periodic (weekly cron): same as above, runs automatically.

Since neither repo ships an OLM bundle, each job first deploys the repo's own sample memcached operator (built from the existing osdk-helm-e2e / ansible-operator-e2e e2e images, same as the existing e2e-helm / e2e-ansible jobs) into memcached-operator-system / memcached-molecule-operator-system via make deploy IMG=..., waits for the deployment to become available, and then runs the tls-13 and tls-scanner-run step-registry refs against that namespace.

Both configs also gain a base_images.tls-scanner-tool entry, required by the tls-scanner-run ref's PULL_SPEC_TLS_SCANNER_TOOL dependency.

Test plan

  • make update regenerated ci-operator/jobs/** presubmits/periodics for both repos with no unexpected diffs.
  • make jobs (ci-operator-checkconfig + ci-operator-prowgen + sanitize-prow-jobs) completed with no errors, validating the new step-registry refs/workflow usage.
  • Once merged, trigger /test tls13-adherence and /test tls-pqc-readiness on a PR against each repo to confirm the sample operator deploys and the scan runs end-to-end.

Made with Cursor

Summary by CodeRabbit

  • Adds TLS 1.3 adherence and post-quantum cryptography readiness CI jobs for openshift/ocp-release-operator-sdk and openshift/ansible-operator-plugins.
  • Adds presubmit and weekly periodic jobs that deploy each repository’s sample memcached operator and run the TLS scanner workflows.
  • Adds tls-scanner-tool as a base image dependency and configures TLS and PQC scanner settings.
  • Updates deployment steps to symlink kubectl to oc before running make deploy.
  • Generated job and configuration validation completed successfully.
  • End-to-end testing after merge remains pending.

…tors

Deploys the sample memcached operator built from the existing
osdk-helm-e2e / ansible-operator-e2e images and runs the tls-13 /
tls-scanner-run steps against it, mirroring the tls13-adherence and
tls-pqc-readiness (+ periodic) pattern used by oadp-operator and
other repos.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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: 242b87e7-c17c-4550-9411-6f42aae682bd

📥 Commits

Reviewing files that changed from the base of the PR and between d780e9a and 884cefe.

📒 Files selected for processing (2)
  • ci-operator/config/openshift/ansible-operator-plugins/openshift-ansible-operator-plugins-main.yaml
  • ci-operator/config/openshift/ocp-release-operator-sdk/openshift-ocp-release-operator-sdk-main.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • ci-operator/config/openshift/ansible-operator-plugins/openshift-ansible-operator-plugins-main.yaml

Walkthrough

The change adds the tls-scanner image and four TLS validation jobs to each of two operator configurations. Jobs cover optional and weekly TLS 1.3 adherence checks and PQC readiness checks.

Changes

TLS validation workflows

Layer / File(s) Summary
Scanner image and TLS 1.3 adherence jobs
ci-operator/config/openshift/ansible-operator-plugins/..., ci-operator/config/openshift/ocp-release-operator-sdk/...
Adds the tls-scanner image and optional and weekly jobs that deploy the memcached operator and run TLS 1.3 adherence and scanner workflows.
PQC readiness jobs
ci-operator/config/openshift/ansible-operator-plugins/..., ci-operator/config/openshift/ocp-release-operator-sdk/...
Adds optional and weekly jobs that deploy the memcached operator and run TLS 1.3 and scanner workflows with PQC checks enabled.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: ⚪ Minimal · up to 884ce

The PR adds optional and periodic TLS/PQC scanner jobs plus their required configuration entries; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant CIJob
  participant MemcachedOperator
  participant TLS13Workflow
  participant TLSScannerWorkflow
  CIJob->>MemcachedOperator: Deploy operator
  MemcachedOperator-->>CIJob: Confirm availability
  CIJob->>TLS13Workflow: Run adherence or PQC checks
  CIJob->>TLSScannerWorkflow: Run scanner workflow
Loading

Possibly related PRs

  • openshift/release#83399: Adds similar TLS 1.3 adherence and PQC readiness workflows for another operator configuration.

Suggested labels: rehearsals-ack

Suggested reviewers: anik120, grokspawn, smith-xyz


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Container-Privileges ❌ Error New jobs add tls-scanner-run refs; with TLS_SCANNER_CLUSTER_LABEL unset, the step creates a Pod with privileged: true, hostPID: true, hostNetwork: true, and runAsUser: 0. Configure these jobs to use a non-privileged scanner mode, or change the scanner manifest to remove host access and root execution before enabling the new refs.
✅ 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 summarizes the main TLS strict-adherence and PQC-readiness scanner job changes for both repositories.
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 PR adds only static Prow job and step identifiers; the diff contains no Ginkgo It/Describe/Context/When titles or dynamic values in test titles.
Test Structure And Quality ✅ Passed The PR changes only ci-operator YAML and shell job definitions; it adds no Ginkgo test code or It blocks, so this Ginkgo-specific check is not applicable.
Microshift Test Compatibility ✅ Passed The full PR adds only CI YAML configuration and generated Prow jobs; it adds no Go files or Ginkgo declarations such as It, Describe, Context, or When.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request changes only CI YAML deploy commands by adding an oc-to-kubectl symlink; it adds no Ginkgo e2e tests or multi-node assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only CI config/generated Prow jobs; added commands and referenced scanner steps introduce no anti-affinity, spread, node targeting, replica, toleration, or PDB constraints.
Ote Binary Stdout Contract ✅ Passed The pull-request range changes only six YAML configuration/job files; it adds no OTE binary, suite setup, or process-level stdout code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR changes only CI YAML and generated Prow jobs; it adds no Ginkgo test source, IPv4 literals, or public URLs. Scanner targets cluster namespaces and internal image dependencies.
No-Weak-Crypto ✅ Passed The PR adds CI YAML/jobs only; added lines contain no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons. Referenced steps scan TLS 1.3/PQC and are unchanged.
No-Sensitive-Data-In-Logs ✅ Passed Changed files contain only YAML job definitions and kubectl symlink setup; no logging of credentials, PII, internal hostnames, session IDs, or customer data is introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci
openshift-ci Bot requested review from anik120 and grokspawn August 10, 2026 12:29
@openshift-ci

openshift-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mytreya-rh

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

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-ansible-operator-plugins-main-tls13-adherence pull-ci-openshift-ansible-operator-plugins-main-tls-pqc-readiness pull-ci-openshift-ocp-release-operator-sdk-main-tls13-adherence pull-ci-openshift-ocp-release-operator-sdk-main-tls-pqc-readiness

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@mytreya-rh: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

The sample operators' Makefiles hard-code `kubectl apply`/`kubectl
delete` in their `deploy`/`undeploy` targets, but the deploy-operator
step only has `oc` available (via cli: latest). Symlink kubectl -> oc
on PATH before invoking `make deploy`, same approach already relied on
implicitly by other steps using oc for everything else.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mytreya-rh

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-ansible-operator-plugins-main-tls13-adherence pull-ci-openshift-ansible-operator-plugins-main-tls-pqc-readiness pull-ci-openshift-ocp-release-operator-sdk-main-tls13-adherence pull-ci-openshift-ocp-release-operator-sdk-main-tls-pqc-readiness

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@mytreya-rh: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@mytreya-rh: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-ansible-operator-plugins-main-tls-pqc-readiness openshift/ansible-operator-plugins presubmit Presubmit changed
pull-ci-openshift-ansible-operator-plugins-main-tls13-adherence openshift/ansible-operator-plugins presubmit Presubmit changed
pull-ci-openshift-ansible-operator-plugins-main-e2e-ansible openshift/ansible-operator-plugins presubmit Ci-operator config changed
pull-ci-openshift-ansible-operator-plugins-main-e2e-ansible-fips openshift/ansible-operator-plugins presubmit Ci-operator config changed
pull-ci-openshift-ansible-operator-plugins-main-e2e-ansible-rhcos10 openshift/ansible-operator-plugins presubmit Ci-operator config changed
pull-ci-openshift-ansible-operator-plugins-main-e2e-ansible-rhcos10-fips openshift/ansible-operator-plugins presubmit Ci-operator config changed
pull-ci-openshift-ansible-operator-plugins-main-images openshift/ansible-operator-plugins presubmit Ci-operator config changed
pull-ci-openshift-ansible-operator-plugins-main-sanity openshift/ansible-operator-plugins presubmit Ci-operator config changed
pull-ci-openshift-ansible-operator-plugins-main-unit openshift/ansible-operator-plugins presubmit Ci-operator config changed
pull-ci-openshift-ansible-operator-plugins-main-verify-collections openshift/ansible-operator-plugins presubmit Ci-operator config changed
pull-ci-openshift-ansible-operator-plugins-main-verify-deps openshift/ansible-operator-plugins presubmit Ci-operator config changed
pull-ci-openshift-ansible-operator-plugins-main-verify-requirements openshift/ansible-operator-plugins presubmit Ci-operator config changed
pull-ci-openshift-ocp-release-operator-sdk-main-tls-pqc-readiness openshift/ocp-release-operator-sdk presubmit Presubmit changed
pull-ci-openshift-ocp-release-operator-sdk-main-tls13-adherence openshift/ocp-release-operator-sdk presubmit Presubmit changed
pull-ci-openshift-ocp-release-operator-sdk-main-e2e-helm openshift/ocp-release-operator-sdk presubmit Ci-operator config changed
pull-ci-openshift-ocp-release-operator-sdk-main-e2e-helm-fips openshift/ocp-release-operator-sdk presubmit Ci-operator config changed
pull-ci-openshift-ocp-release-operator-sdk-main-e2e-helm-rhcos10 openshift/ocp-release-operator-sdk presubmit Ci-operator config changed
pull-ci-openshift-ocp-release-operator-sdk-main-e2e-helm-rhcos10-fips openshift/ocp-release-operator-sdk presubmit Ci-operator config changed
pull-ci-openshift-ocp-release-operator-sdk-main-images openshift/ocp-release-operator-sdk presubmit Ci-operator config changed
pull-ci-openshift-ocp-release-operator-sdk-main-sanity openshift/ocp-release-operator-sdk presubmit Ci-operator config changed
pull-ci-openshift-ocp-release-operator-sdk-main-unit openshift/ocp-release-operator-sdk presubmit Ci-operator config changed
pull-ci-openshift-ocp-release-operator-sdk-main-verify-deps openshift/ocp-release-operator-sdk presubmit Ci-operator config changed
periodic-ci-openshift-ansible-operator-plugins-main-tls13-adherence-periodic N/A periodic Periodic changed
periodic-ci-openshift-ansible-operator-plugins-main-tls-pqc-readiness-periodic N/A periodic Periodic changed
periodic-ci-openshift-ocp-release-operator-sdk-main-tls-pqc-readiness-periodic N/A periodic Periodic changed

A total of 26 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs.

A full list of affected jobs can be found here

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@mytreya-rh: The following tests 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/rehearse/openshift/ocp-release-operator-sdk/main/tls13-adherence 884cefe link unknown /pj-rehearse pull-ci-openshift-ocp-release-operator-sdk-main-tls13-adherence
ci/rehearse/openshift/ansible-operator-plugins/main/tls13-adherence 884cefe link unknown /pj-rehearse pull-ci-openshift-ansible-operator-plugins-main-tls13-adherence

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

Copy link
Copy Markdown
Contributor

@mytreya-rh: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Aug 14, 2026
@mytreya-rh

Copy link
Copy Markdown
Contributor Author

/cc @chiragkyal

@openshift-ci
openshift-ci Bot requested a review from chiragkyal August 14, 2026 04:50
mytreya-rh added a commit to mytreya-rh/ocp-release-operator-sdk that referenced this pull request Aug 14, 2026
…n Helm operator metrics server

Fixes the tls13-adherence CI job: the Helm operator's metrics server
(port 8443) never set a TLS MinVersion, so it always negotiated down to
TLS 1.2 regardless of the cluster's configured TLS security profile,
violating strict adherence on Modern (TLS-1.3-only) clusters.

Adds internal/helm/openshifttls, a downstream-only package that:
 - registers itself with the generic run.ClusterTLSPolicy extension
   point (see previous commit) via a blank import from
   cmd/helm-operator/main.go;
 - fetches the TLS profile from apiservers.config.openshift.io/cluster
   at startup using github.com/openshift/controller-runtime-common/pkg/tls
   (FetchAPIServerTLSProfile / NewTLSConfigFromProfile), falling back to
   the default (Intermediate) profile on any error - e.g. non-OpenShift
   clusters or a missing APIServer object/CRD - so startup is never
   blocked;
 - appends the resulting TLS config (MinVersion/CipherSuites) to
   options.Metrics.TLSOpts;
 - registers a SecurityProfileWatcher that cancels the manager's run
   context when the profile changes, triggering a graceful shutdown; the
   surrounding Deployment/container restart re-applies the (possibly new)
   profile on the next boot.

Also:
 - adds a get/list/watch RBAC rule for config.openshift.io/apiservers to
   the Helm plugin's manager_role.go scaffold template, and mirrors it
   into the memcached-operator testdata's role.yaml and CSV
   clusterPermissions (the fixture this CI job actually deploys);
 - adds github.com/openshift/controller-runtime-common (and its
   transitive github.com/openshift/api, github.com/openshift/library-go)
   to go.mod/go.sum/vendor.

This commit is genuinely OpenShift-specific and is not proposed
upstream; it is permanent carry, unlike the two preceding commits.

Fixes: rehearse-*-tls13-adherence job in openshift/release#83172
Ref: OCPSTRAT-2611
Co-authored-by: Cursor <cursoragent@cursor.com>
mytreya-rh added a commit to mytreya-rh/ocp-release-operator-sdk that referenced this pull request Aug 14, 2026
…n Helm operator metrics server

Fixes the tls13-adherence CI job: the Helm operator's metrics server
(port 8443) never set a TLS MinVersion, so it always negotiated down to
TLS 1.2 regardless of the cluster's configured TLS security profile,
violating strict adherence on Modern (TLS-1.3-only) clusters.

Adds internal/helm/openshifttls, a downstream-only package that:
 - registers itself with the generic run.ClusterTLSPolicy extension
   point (see previous commit) via a blank import from
   cmd/helm-operator/main.go;
 - fetches the TLS profile from apiservers.config.openshift.io/cluster
   at startup using github.com/openshift/controller-runtime-common/pkg/tls
   (FetchAPIServerTLSProfile / NewTLSConfigFromProfile), falling back to
   the default (Intermediate) profile on any error - e.g. non-OpenShift
   clusters or a missing APIServer object/CRD - so startup is never
   blocked;
 - appends the resulting TLS config (MinVersion/CipherSuites) to
   options.Metrics.TLSOpts;
 - registers a SecurityProfileWatcher that cancels the manager's run
   context when the profile changes, triggering a graceful shutdown; the
   surrounding Deployment/container restart re-applies the (possibly new)
   profile on the next boot.

Also:
 - adds a get/list/watch RBAC rule for config.openshift.io/apiservers to
   the Helm plugin's manager_role.go scaffold template, and mirrors it
   into the memcached-operator testdata's role.yaml and CSV
   clusterPermissions (the fixture this CI job actually deploys);
 - adds github.com/openshift/controller-runtime-common (and its
   transitive github.com/openshift/api, github.com/openshift/library-go)
   to go.mod/go.sum/vendor.

This commit is genuinely OpenShift-specific and is not proposed
upstream; it is permanent carry, unlike the two preceding commits.

Fixes: rehearse-*-tls13-adherence job in openshift/release#83172
Ref: OCPSTRAT-2611
Co-authored-by: Cursor <cursoragent@cursor.com>
mytreya-rh added a commit to mytreya-rh/ansible-operator-plugins that referenced this pull request Aug 14, 2026
…n Ansible operator metrics server

Fixes the tls13-adherence CI job: the ansible-operator's metrics server
(port 8443) never set a TLS MinVersion, so it always negotiated down to
TLS 1.2 regardless of the cluster's configured TLS security profile,
violating strict adherence on Modern (TLS-1.3-only) clusters.

Adds internal/ansible/openshifttls, a downstream-only package that:
 - registers itself with the generic run.ClusterTLSPolicy extension
   point (see previous commit) via a blank import from
   cmd/ansible-operator/main.go;
 - fetches the TLS profile from apiservers.config.openshift.io/cluster
   at startup using github.com/openshift/controller-runtime-common/pkg/tls
   (FetchAPIServerTLSProfile / NewTLSConfigFromProfile), falling back to
   the default (Intermediate) profile on any error - e.g. non-OpenShift
   clusters or a missing APIServer object/CRD - so startup is never
   blocked;
 - appends the resulting TLS config (MinVersion/CipherSuites) to
   options.Metrics.TLSOpts;
 - registers a SecurityProfileWatcher that cancels the manager's run
   context when the profile changes, triggering a graceful shutdown; the
   surrounding Deployment/container restart re-applies the (possibly new)
   profile on the next boot.

Also:
 - adds a get/list/watch RBAC rule for config.openshift.io/apiservers to
   the Ansible plugin's role.go scaffold template, and mirrors it (via
   `make generate`, verified to produce an identical diff) into the
   memcached-molecule-operator testdata's role.yaml - the fixture this
   CI job actually deploys;
 - adds github.com/openshift/controller-runtime-common (and its
   transitive github.com/openshift/api, github.com/openshift/library-go)
   to go.mod/go.sum (vendor/ synced in the following commit).

This commit is genuinely OpenShift-specific and is not proposed
upstream; it is permanent carry, unlike the two preceding commits.

Fixes: rehearse-*-tls13-adherence job in openshift/release#83172
Ref: OCPSTRAT-2611
Co-authored-by: Cursor <cursoragent@cursor.com>
mytreya-rh added a commit to mytreya-rh/ocp-release-operator-sdk that referenced this pull request Aug 14, 2026
…n Helm operator metrics server

Fixes the tls13-adherence CI job: the Helm operator's metrics server
(port 8443) never set a TLS MinVersion, so it always negotiated down to
TLS 1.2 regardless of the cluster's configured TLS security profile,
violating strict adherence on Modern (TLS-1.3-only) clusters.

Adds internal/helm/openshifttls, a downstream-only package that:
 - registers itself with the generic run.ClusterTLSPolicy extension
   point (see previous commit) via a blank import from
   cmd/helm-operator/main.go;
 - fetches the TLS profile from apiservers.config.openshift.io/cluster
   at startup using github.com/openshift/controller-runtime-common/pkg/tls
   (FetchAPIServerTLSProfile / NewTLSConfigFromProfile), falling back to
   the default (Intermediate) profile on any error - e.g. non-OpenShift
   clusters or a missing APIServer object/CRD - so startup is never
   blocked;
 - appends the resulting TLS config (MinVersion/CipherSuites) to
   options.Metrics.TLSOpts;
 - registers a SecurityProfileWatcher that cancels the manager's run
   context when the profile changes, triggering a graceful shutdown; the
   surrounding Deployment/container restart re-applies the (possibly new)
   profile on the next boot.

Also:
 - adds a get/list/watch RBAC rule for config.openshift.io/apiservers to
   the Helm plugin's manager_role.go scaffold template, and mirrors it
   into the memcached-operator testdata's role.yaml and CSV
   clusterPermissions (the fixture this CI job actually deploys);
 - adds github.com/openshift/controller-runtime-common (and its
   transitive github.com/openshift/api, github.com/openshift/library-go)
   to go.mod/go.sum/vendor.

This commit is genuinely OpenShift-specific and is not proposed
upstream; it is permanent carry, unlike the two preceding commits.

Fixes: rehearse-*-tls13-adherence job in openshift/release#83172
Ref: OCPSTRAT-2611
Co-authored-by: Cursor <cursoragent@cursor.com>
mytreya-rh added a commit to mytreya-rh/ansible-operator-plugins that referenced this pull request Aug 14, 2026
…n Ansible operator metrics server

Fixes the tls13-adherence CI job: the ansible-operator's metrics server
(port 8443) never set a TLS MinVersion, so it always negotiated down to
TLS 1.2 regardless of the cluster's configured TLS security profile,
violating strict adherence on Modern (TLS-1.3-only) clusters.

Adds internal/ansible/openshifttls, a downstream-only package that:
 - registers itself with the generic run.ClusterTLSPolicy extension
   point (see previous commit) via a blank import from
   cmd/ansible-operator/main.go;
 - fetches the TLS profile from apiservers.config.openshift.io/cluster
   at startup using github.com/openshift/controller-runtime-common/pkg/tls
   (FetchAPIServerTLSProfile / NewTLSConfigFromProfile), falling back to
   the default (Intermediate) profile on any error - e.g. non-OpenShift
   clusters or a missing APIServer object/CRD - so startup is never
   blocked;
 - appends the resulting TLS config (MinVersion/CipherSuites) to
   options.Metrics.TLSOpts;
 - registers a SecurityProfileWatcher that cancels the manager's run
   context when the profile changes, triggering a graceful shutdown; the
   surrounding Deployment/container restart re-applies the (possibly new)
   profile on the next boot.

Also:
 - adds a get/list/watch RBAC rule for config.openshift.io/apiservers to
   the Ansible plugin's role.go scaffold template, and mirrors it (via
   `make generate`, verified to produce an identical diff) into the
   memcached-molecule-operator testdata's role.yaml - the fixture this
   CI job actually deploys;
 - adds github.com/openshift/controller-runtime-common (and its
   transitive github.com/openshift/api, github.com/openshift/library-go)
   to go.mod/go.sum (vendor/ synced in the following commit).

This commit is genuinely OpenShift-specific and is not proposed
upstream; it is permanent carry, unlike the two preceding commits.

Fixes: rehearse-*-tls13-adherence job in openshift/release#83172
Ref: OCPSTRAT-2611
Co-authored-by: Cursor <cursoragent@cursor.com>
steps:
cluster_profile: openshift-org-gcp
env:
PQC_CHECK: "false"

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.

I was comparing the changes with https://github.com/openshift/release/pull/82718/changes PR, but I cannot see PQC_CHECK envvar was defined there. Is false the default value?

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.

yes. By default its false.

# Enable post-quantum cryptography checks when requested by the step ref.
if [[ "${PQC_CHECK:-false}" == "true" ]]; then
SCANNER_ARGS="${SCANNER_ARGS} --pqc-check"
echo "PQC readiness mode enabled: checks TLS 1.3 support and mlkem or mlkem25519 support per target."
fi

Comment on lines +174 to +175
make deploy IMG="${IMAGE_FORMAT}"
oc wait --for=condition=Available --timeout=5m -n memcached-molecule-operator-system deployment/memcached-molecule-operator-controller-manager

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.

We generally do some modifications before checking whether the pods are running or not

xref: https://github.com/openshift/ansible-operator-plugins/blob/2e572ad8a552f449fd166d776005a60f52dd8fdb/openshift/ci/tests/e2e-ansible-scaffolding.sh#L153-L199

Don't we need that here?

Comment on lines +170 to +173
mkdir -p /tmp/bin
ln -sf "$(command -v oc)" /tmp/bin/kubectl
export PATH="/tmp/bin:${PATH}"
cd testdata/memcached-molecule-operator

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.

Instead of modifying this here, can we not make the actual script configurable to deploy the operator, then proceed if required?

- ref: tls-13
- ref: tls-scanner-run
workflow: ipi-gcp
- as: tls13-adherence-periodic

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.

Do we really need a periodic job? Given the traffic on this repo, is the pre-merge test not enough?

@@ -146,6 +151,128 @@ tests:
requests:
cpu: 100m
workflow: ipi-gcp
- always_run: false
as: tls13-adherence
optional: true

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.

Instead of another periodic job, I think making this required would be more reasonable.

- ref: tls-13
- ref: tls-scanner-run
workflow: ipi-gcp
- as: tls-pqc-readiness-periodic

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.

Same comment as above to periodic job

steps:
cluster_profile: openshift-org-gcp
env:
PQC_CHECK: "true"

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.

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.

Similar comments for this repo as well, not adding them again.

mytreya-rh added a commit to mytreya-rh/ansible-operator-plugins that referenced this pull request Aug 17, 2026
CI jobs that just need a running sample operator (e.g. the tls13-adherence
scanner job) currently reimplement a stripped-down deploy sequence directly
in the openshift/release ci-operator config, missing the memory-limit patch
and RBAC tweaks this script already applies, and working around the lack of
a kubectl binary via a manual oc-to-kubectl symlink.

Extract the setup/patch/deploy logic into a deploy_operator() function
(mirroring the existing test_operator() function), and add a DEPLOY_ONLY=true
mode that calls deploy_operator and then exits before the CR-based functional
test and undeploy, leaving the operator running. Expose it via a new
deploy-e2e-ansible Makefile target so callers don't need to know the env var.
Default (unset) behavior is unchanged.

Ref: openshift/release#83172 (comment)
Co-authored-by: Cursor <cursoragent@cursor.com>
mytreya-rh added a commit to mytreya-rh/ocp-release-operator-sdk that referenced this pull request Aug 17, 2026
Extract the memcached-operator deployment steps (RBAC grant, make
deploy, rollout wait, metrics clusterrolebinding, namespace switch)
into a deploy_operator() function, and gate the rest of the script
(test_operator, metrics cleanup, make undeploy) behind a DEPLOY_ONLY
env var.

This lets CI jobs that only need a running operator (e.g. the
tls13-adherence job, which scans the operator with tls-scanner)
invoke `DEPLOY_ONLY=true make -f ci/prow.Makefile test-e2e-helm`
instead of duplicating inline deploy commands, per feedback on
openshift/release#83172 (comment).

Default behavior (DEPLOY_ONLY unset) is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
mytreya-rh added a commit to mytreya-rh/ansible-operator-plugins that referenced this pull request Aug 17, 2026
… for CI reuse

CI jobs that just need a running sample operator (e.g. the tls13-adherence
scanner job) currently reimplement a stripped-down deploy sequence directly
in the openshift/release ci-operator config, missing the memory-limit patch
and RBAC tweaks this script already applies, and working around the lack of
a kubectl binary via a manual oc-to-kubectl symlink.

Extract the setup/patch/deploy logic into a deploy_operator() function
(mirroring the existing test_operator() function), and add a DEPLOY_ONLY=true
mode that calls deploy_operator and then exits before the CR-based functional
test and undeploy, leaving the operator running. Expose it via a new
deploy-e2e-ansible Makefile target so callers don't need to know the env var.
Default (unset) behavior is unchanged.

Ref: openshift/release#83172 (comment)
Co-authored-by: Cursor <cursoragent@cursor.com>
mytreya-rh added a commit to mytreya-rh/ocp-release-operator-sdk that referenced this pull request Aug 17, 2026
Extract the memcached-operator deployment steps (RBAC grant, make
deploy, rollout wait, metrics clusterrolebinding, namespace switch)
into a deploy_operator() function, and gate the rest of the script
(test_operator, metrics cleanup, make undeploy) behind a DEPLOY_ONLY
env var.

This lets CI jobs that only need a running operator (e.g. the
tls13-adherence job, which scans the operator with tls-scanner)
invoke `DEPLOY_ONLY=true make -f ci/prow.Makefile test-e2e-helm`
instead of duplicating inline deploy commands, per feedback on
openshift/release#83172 (comment).

Default behavior (DEPLOY_ONLY unset) is unchanged.

ci/tests/e2e-helm.sh is OpenShift/Prow-specific tooling with no
counterpart in operator-framework/operator-sdk (its upstream
predecessor, hack/tests/e2e-helm.sh, was replaced by Go-based e2e
tests years ago), so this is permanent carry, not proposed upstream.

Co-authored-by: Cursor <cursoragent@cursor.com>
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. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants