Skip to content

OCPBUGS-115269: openstack-manila: Consume CA cert from CCO secret - #617

Open
stephenfin wants to merge 5 commits into
openshift:mainfrom
shiftstack:OCPBUGS-115269
Open

OCPBUGS-115269: openstack-manila: Consume CA cert from CCO secret#617
stephenfin wants to merge 5 commits into
openshift:mainfrom
shiftstack:OCPBUGS-115269

Conversation

@stephenfin

@stephenfin stephenfin commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Update both the operator itself and the assets for the CSI driver to reflect changes made to cluster storage operator (CSO) in openshift/cluster-storage-operator#557 and cloud credential operator (CCO) in openshift/cloud-credential-operator#850.

This was originally targeted in #359 but #373 has broken hypershift support, so this is now targeted as a bug.

Depends on openshift/hypershift#9467

Commit 6dd0da4 removed the last user.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Since 4.19, Cloud Credential Operator (CCO) will provision the CA file
as part of a cloud credential secret alongside the clouds.yaml, while
Cluster Storage Operator (CSO) will mount this secret at
'/etc/openstack/ca.crt' [1]. This is true for both standalone [2] and
hypershift deployments [3]. Update the code to consume from the new
location, allowing us to drop the CSO fallback.

While here, we also replace use of the deprecated `ioutil.ReadFile`
function in favour of its suggested replacement, `os.ReadFile` [2]. We
also replace use of `os.IsNotExist` in favour of its suggested
replacement, `errors.Is(err, fs.ErrNotExist)` [3].

[1] github.com/openshift/cluster-storage-operator/pull/557
[2] https://github.com/openshift/cluster-storage-operator/blob/25672c2a/assets/csidriveroperators/openstack-manila/standalone/generated/openshift-cluster-csi-drivers_apps_v1_deployment_manila-csi-driver-operator.yaml#L68-L74
[3] https://github.com/openshift/cluster-storage-operator/blob/25672c2a/assets/csidriveroperators/openstack-manila/hypershift/mgmt/generated/apps_v1_deployment_manila-csi-driver-operator.yaml#L106-L111
[2] https://pkg.go.dev/io/ioutil#ReadFile
[3] https://pkg.go.dev/os#IsNotExist

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Make the purpose of this patch more obvious. We also fix some
indentation.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This is going to be superseded in a coming change. Rename it in
preparation.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
cloud-credential-operator and hypershift-operator now support deploying
the CA cert to the credentials secrets they generate, which means we can
start consuming them from there rather than from configuration.

In this change, we modify the controller to start (optionally) consuming
the CA cert from the secret. We leave a fallback in place since we still
need to update cloud-credentials-operator to have clouds.yaml point to
the new location. We can remove this in the future once the CCO change
has merged.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
@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: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@stephenfin: This pull request references Jira Issue OCPBUGS-115269, which is invalid:

  • expected the bug to target the "5.1.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Update both the operator itself and the assets for the CSI driver to reflect changes made to cluster storage operator (CSO) in openshift/cluster-storage-operator#557 and cloud credential operator (CCO) in openshift/cloud-credential-operator#850.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
openshift-ci Bot requested review from dobsonj and jsafrane September 1, 2026 15:38
@openshift-ci

openshift-ci Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stephenfin

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 Sep 1, 2026
@stephenfin

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@stephenfin: This pull request references Jira Issue OCPBUGS-115269, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.1.0) matches configured target version for branch (5.1.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

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: 1ce19683-e893-44be-88e9-a270fada0dcf

📥 Commits

Reviewing files that changed from the base of the PR and between 857bbb1 and 80743b8.

⛔ Files ignored due to path filters (4)
  • assets/overlays/openstack-manila/generated/hypershift/controller.yaml is excluded by !**/generated/**
  • assets/overlays/openstack-manila/generated/hypershift/node.yaml is excluded by !**/generated/**
  • assets/overlays/openstack-manila/generated/standalone/controller.yaml is excluded by !**/generated/**
  • assets/overlays/openstack-manila/generated/standalone/node.yaml is excluded by !**/generated/**
📒 Files selected for processing (7)
  • assets/overlays/openstack-manila/patches/controller_add_driver.yaml
  • assets/overlays/openstack-manila/patches/controller_rename_config_map.yaml
  • assets/overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml
  • assets/overlays/openstack-manila/patches/node_add_driver.yaml
  • pkg/driver/openstack-manila/openstack_manila.go
  • pkg/openstack-manila/client/openstack.go
  • pkg/openstack-manila/util/const.go
💤 Files with no reviewable changes (1)
  • assets/overlays/openstack-manila/patches/controller_rename_config_map.yaml

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The OpenStack Manila controller and DaemonSet now use projected cloud-credentials volumes for clouds.yaml and optional certificates. The legacy ConfigMap certificate mount remains available under legacy-cacert. HyperShift now applies the ConfigMap volume patch directly. Certificate lookup uses wrapped-error classification, and the certificate path constant changed to /etc/openstack/ca.crt.

Suggested reviewers: jsafrane, dobsonj

Merge Risk: ⚪ Minimal · up to 80743

This change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (3 skipped: 3 …
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 PASS: The pull request changes 11 asset and production Go files, with no test files changed. The added-line diff contains no Ginkgo declarations such as It(), Describe(), Context(), or When(), and no …
Test Structure And Quality ✅ Passed PASS: The pull request changes 11 asset and production Go files, with no *_test.go files or test directories changed. The changed Go files contain no Ginkgo constructs such as It, BeforeEach, `A…
Microshift Test Compatibility ✅ Passed PASS: The pull request adds or modifies no Ginkgo e2e tests. The full diff from origin/main...HEAD contains only YAML asset patches/generated manifests and Go implementation files. No changed file con…
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: The pull request adds no Ginkgo e2e tests. The complete diff from origin/main changes only OpenStack Manila asset YAML files and three Go implementation/configuration files. No changed path is a…
Topology-Aware Scheduling Compatibility ✅ Passed PASS. The pull request changes credential and CA-certificate volumes, certificate handling, and the HyperShift config-map patch. It does not add or change scheduling constraints. The diff contains no …
Ote Binary Stdout Contract ✅ Passed PASS: The pull request does not introduce stdout writes in process-level code. Its Go changes only update an asset patch reference, an error check, and constants. The diff adds no fmt.Print*, log/klog…
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The pull request adds or modifies only OpenStack Manila assets and Go implementation files. The diff adds no Ginkgo tests or e2e test files, and added-line searches found no IPv4 assumptions or …
No-Weak-Crypto ✅ Passed PASS: The PR diff introduces no MD5, SHA1, DES, 3DES, RC4, Blowfish, or ECB usage. It adds no custom cryptography or secret/token comparisons. The crypto-related Go change only replaces `os.IsNotExist…
Container-Privileges ✅ Passed PASS. The PR adds no privileged: true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation: true, or root-running setting. The existing node manifest uses privileged: true
No-Sensitive-Data-In-Logs ✅ Passed PASS: The PR adds no logging or print statements. The Go changes only update certificate error matching, the certificate path, and the HyperShift asset patch. The YAML changes mount clouds.yaml and …
Title check ✅ Passed The title clearly identifies the OpenStack Manila change and the migration to consume the CA certificate from the Cloud Credential Operator secret.
Description check ✅ Passed The description directly explains the operator and asset updates, the related Cluster Storage Operator and Cloud Credential Operator changes, the HyperShift regression, and the dependency.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (3 skipped: 3 unsupported.)

Full details: Stable And Deterministic Test Names

Explanation

PASS: The pull request changes 11 asset and production Go files, with no test files changed. The added-line diff contains no Ginkgo declarations such as It(), Describe(), Context(), or When(), and no changed file contains those test-title APIs. Therefore, the pull request introduces no unstable or overly-specific test name.

Full details: Test Structure And Quality

Explanation

PASS: The pull request changes 11 asset and production Go files, with no *_test.go files or test directories changed. The changed Go files contain no Ginkgo constructs such as It, BeforeEach, AfterEach, Eventually, or Consistently. Therefore, this test-structure check is not applicable, and no test-quality failure was introduced.

Full details: Microshift Test Compatibility

Explanation

PASS: The pull request adds or modifies no Ginkgo e2e tests. The full diff from origin/main...HEAD contains only YAML asset patches/generated manifests and Go implementation files. No changed file contains It(), Describe(), Context(), or When(), so the MicroShift test-compatibility check is not applicable.

Full details: Single Node Openshift (Sno) Test Compatibility

Explanation

PASS: The pull request adds no Ginkgo e2e tests. The complete diff from origin/main changes only OpenStack Manila asset YAML files and three Go implementation/configuration files. No changed path is a test file, and no added line contains Ginkgo declarations such as It(), Describe(), Context(), or When(). Therefore the SNO test-compatibility check is not applicable.

Full details: Topology-Aware Scheduling Compatibility

Explanation

PASS. The pull request changes credential and CA-certificate volumes, certificate handling, and the HyperShift config-map patch. It does not add or change scheduling constraints. The diff contains no changed affinity, topology-spread, replica, node-selector, node-affinity, toleration, taint, or PDB fields. Existing controller manifests retain preferred anti-affinity and maxUnavailable: 1; existing control-plane selectors and broad node tolerations are unchanged. No topology-specific scheduling failure is introduced.

Full details: Ote Binary Stdout Contract

Explanation

PASS: The pull request does not introduce stdout writes in process-level code. Its Go changes only update an asset patch reference, an error check, and constants. The diff adds no fmt.Print*, log/klog output, os.Stdout, Ginkgo setup, main(), init(), TestMain(), or suite setup code. The repository also contains no OTE or Ginkgo suite code. Existing klog calls are unchanged and are not causal to this pull request.

Full details: Ipv6 And Disconnected Network Test Compatibility

Explanation

PASS: The pull request adds or modifies only OpenStack Manila assets and Go implementation files. The diff adds no Ginkgo tests or e2e test files, and added-line searches found no IPv4 assumptions or external connectivity calls. The check is therefore not applicable.

Full details: No-Weak-Crypto

Explanation

PASS: The PR diff introduces no MD5, SHA1, DES, 3DES, RC4, Blowfish, or ECB usage. It adds no custom cryptography or secret/token comparisons. The crypto-related Go change only replaces os.IsNotExist(err) with errors.Is(err, os.ErrNotExist) while certificate loading continues to use the existing crypto/tls and crypto/x509 code.

Full details: Container-Privileges

Explanation

PASS. The PR adds no privileged: true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation: true, or root-running setting. The existing node manifest uses privileged: true and hostNetwork: true, but the base-to-HEAD diff shows these settings are unchanged. The added manifest lines only change credential and CA volume mounts.

Full details: No-Sensitive-Data-In-Logs

Explanation

PASS: The PR adds no logging or print statements. The Go changes only update certificate error matching, the certificate path, and the HyperShift asset patch. The YAML changes mount clouds.yaml and an optional CA certificate from a Secret; they do not emit credential contents, tokens, passwords, hostnames, or customer data to logs. Existing error wrapping and informational logs remain unchanged.

✨ 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 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@stephenfin: 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/prow/hypershift-e2e-aks 80743b8 link false /test hypershift-e2e-aks
ci/prow/hypershift-e2e-openstack-aws-csi-manila 80743b8 link true /test hypershift-e2e-openstack-aws-csi-manila

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-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants