From 97de3d9a95a685820df4505e1bacf6549bb2989e Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 1 Sep 2026 14:31:38 +0100 Subject: [PATCH 1/5] openstack-manila: Remove dead const Commit 6dd0da4857760ddce64495572b8fdd37315d6e98 removed the last user. Signed-off-by: Stephen Finucane --- pkg/openstack-manila/util/const.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/openstack-manila/util/const.go b/pkg/openstack-manila/util/const.go index bdd82f42d..59b92d9be 100644 --- a/pkg/openstack-manila/util/const.go +++ b/pkg/openstack-manila/util/const.go @@ -1,7 +1,6 @@ package util const ( - CloudCredentialSecretName = "manila-cloud-credentials" ManilaSecretName = "csi-manila-secrets" CloudConfigNamespace = "openshift-config" From ccb86198ca3829f22bf6296c8b6eabfa6e57ddd8 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 19 Feb 2025 17:13:56 +0000 Subject: [PATCH 2/5] openstack-manila: Consume CA cert from new location 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 --- pkg/openstack-manila/client/openstack.go | 3 ++- pkg/openstack-manila/util/const.go | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/openstack-manila/client/openstack.go b/pkg/openstack-manila/client/openstack.go index 37b0dda3f..eb48fc0fb 100644 --- a/pkg/openstack-manila/client/openstack.go +++ b/pkg/openstack-manila/client/openstack.go @@ -4,6 +4,7 @@ import ( "context" "crypto/tls" "crypto/x509" + "errors" "fmt" "net/http" "os" @@ -58,7 +59,7 @@ func (o *openStackClient) GetShareTypes() ([]sharetypes.ShareType, error) { provider.UserAgent = ua cert, err := getCloudProviderCert() - if err != nil && !os.IsNotExist(err) { + if err != nil && !errors.Is(err, os.ErrNotExist) { return nil, fmt.Errorf("failed to get cloud provider CA certificate: %w", err) } diff --git a/pkg/openstack-manila/util/const.go b/pkg/openstack-manila/util/const.go index 59b92d9be..872b1ee2e 100644 --- a/pkg/openstack-manila/util/const.go +++ b/pkg/openstack-manila/util/const.go @@ -8,9 +8,11 @@ const ( StorageClassNamePrefix = "csi-manila-" - // OpenStack config file name (as present in the operator Deployment) + // OpenStack config files + // Note that these are for the operator, not the driver itself. The paths + // are defined in cluster-storage-operator CloudConfigFilename = "/etc/openstack/clouds.yaml" - CertFile = "/etc/openstack-ca/ca-bundle.pem" + CertFile = "/etc/openstack/ca.crt" // Name of cloud in secret provided by cloud-credentials-operator CloudName = "openstack" From a75dc0e74342637762d4e22ad6442f359b649c84 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 1 Sep 2026 11:11:12 +0100 Subject: [PATCH 3/5] openstack-manila: Rename hypershift config map patch Make the purpose of this patch more obvious. We also fix some indentation. Signed-off-by: Stephen Finucane --- .../generated/hypershift/controller.yaml | 2 +- .../patches/controller_rename_config_map.yaml | 11 ----------- .../patches/controller_use_hypershift_config_map.yaml | 11 +++++++++++ pkg/driver/openstack-manila/openstack_manila.go | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 assets/overlays/openstack-manila/patches/controller_rename_config_map.yaml create mode 100644 assets/overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml diff --git a/assets/overlays/openstack-manila/generated/hypershift/controller.yaml b/assets/overlays/openstack-manila/generated/hypershift/controller.yaml index dea3f7ef3..e90d5c029 100644 --- a/assets/overlays/openstack-manila/generated/hypershift/controller.yaml +++ b/assets/overlays/openstack-manila/generated/hypershift/controller.yaml @@ -22,7 +22,7 @@ # Applied strategic merge patch common/hypershift/controller_add_hypershift_desired_version_annotation.yaml # Applied strategic merge patch common/readOnlyRootFilesystem.yaml # Applied strategic merge patch overlays/openstack-manila/patches/controller_add_hypershift_volumes.yaml -# Applied strategic merge patch overlays/openstack-manila/patches/controller_rename_config_map.yaml +# Applied strategic merge patch overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml # Applied strategic merge patch overlays/openstack-manila/patches/modify_anti_affinity_selector.yaml # # diff --git a/assets/overlays/openstack-manila/patches/controller_rename_config_map.yaml b/assets/overlays/openstack-manila/patches/controller_rename_config_map.yaml deleted file mode 100644 index aaaca5043..000000000 --- a/assets/overlays/openstack-manila/patches/controller_rename_config_map.yaml +++ /dev/null @@ -1,11 +0,0 @@ -spec: - template: - spec: - volumes: - - configMap: - items: - - key: ca-bundle.pem - path: ca-bundle.pem - name: openstack-cloud-config - optional: true - name: cacert diff --git a/assets/overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml b/assets/overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml new file mode 100644 index 000000000..22e77fb09 --- /dev/null +++ b/assets/overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml @@ -0,0 +1,11 @@ +spec: + template: + spec: + volumes: + - configMap: + items: + - key: ca-bundle.pem + path: ca-bundle.pem + name: openstack-cloud-config + optional: true + name: cacert diff --git a/pkg/driver/openstack-manila/openstack_manila.go b/pkg/driver/openstack-manila/openstack_manila.go index f3dfdcf87..58cb9e9e0 100644 --- a/pkg/driver/openstack-manila/openstack_manila.go +++ b/pkg/driver/openstack-manila/openstack_manila.go @@ -76,7 +76,7 @@ func GetOpenStackManilaGeneratorConfig() *generator.CSIDriverGeneratorConfig { Assets: commongenerator.DefaultControllerAssets, AssetPatches: commongenerator.DefaultAssetPatches.WithPatches(generator.HyperShiftOnly, "controller.yaml", "overlays/openstack-manila/patches/controller_add_hypershift_volumes.yaml", - "controller.yaml", "overlays/openstack-manila/patches/controller_rename_config_map.yaml", + "controller.yaml", "overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml", ).WithPatches(generator.AllFlavours, "service.yaml", "overlays/openstack-manila/patches/modify_service_selector.yaml", "controller_pdb.yaml", "overlays/openstack-manila/patches/modify_pdb.yaml", From fd4bc8198ba9b2cd2e6e0514c1f86f3a66b0cdd8 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 13 Mar 2025 11:06:07 +0000 Subject: [PATCH 4/5] openstack-manila: Rename cacert mount This is going to be superseded in a coming change. Rename it in preparation. Signed-off-by: Stephen Finucane --- .../generated/hypershift/controller.yaml | 6 +-- .../generated/hypershift/node.yaml | 24 +++++------ .../generated/standalone/controller.yaml | 6 +-- .../generated/standalone/node.yaml | 24 +++++------ .../patches/controller_add_driver.yaml | 21 ++++------ .../controller_use_hypershift_config_map.yaml | 2 +- .../patches/node_add_driver.yaml | 42 +++++++++---------- 7 files changed, 60 insertions(+), 65 deletions(-) diff --git a/assets/overlays/openstack-manila/generated/hypershift/controller.yaml b/assets/overlays/openstack-manila/generated/hypershift/controller.yaml index e90d5c029..105a2ab85 100644 --- a/assets/overlays/openstack-manila/generated/hypershift/controller.yaml +++ b/assets/overlays/openstack-manila/generated/hypershift/controller.yaml @@ -146,11 +146,11 @@ spec: volumeMounts: - mountPath: /plugin name: socket-dir - - mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config - name: cacert - mountPath: /etc/openstack name: cloud-credentials readOnly: true + - mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config + name: legacy-cacert - args: - --nodeid=$(NODE_ID) - --endpoint=unix://plugin/csi-nfs.sock @@ -389,7 +389,7 @@ spec: path: ca-bundle.pem name: openstack-cloud-config optional: true - name: cacert + name: legacy-cacert - name: hosted-kubeconfig secret: defaultMode: 420 diff --git a/assets/overlays/openstack-manila/generated/hypershift/node.yaml b/assets/overlays/openstack-manila/generated/hypershift/node.yaml index 6c384a88d..1cab59539 100644 --- a/assets/overlays/openstack-manila/generated/hypershift/node.yaml +++ b/assets/overlays/openstack-manila/generated/hypershift/node.yaml @@ -82,19 +82,19 @@ spec: readOnlyRootFilesystem: true terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - - mountPath: /etc/openstack - name: cloud-credentials - readOnly: true - mountPath: /var/lib/kubelet/plugins/manila.csi.openstack.org name: plugin-dir - mountPath: /var/lib/kubelet/plugins/csi-nfsplugin name: fwd-plugin-dir - - mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config - name: cacert - mountPath: /etc/selinux name: etc-selinux - mountPath: /sys/fs name: sys-fs + - mountPath: /etc/openstack + name: cloud-credentials + readOnly: true + - mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config + name: legacy-cacert - args: - --csi-address=/csi/csi.sock - --http-endpoint=127.0.0.1:10305 @@ -214,12 +214,6 @@ spec: - name: metrics-serving-cert secret: secretName: manila-csi-driver-node-metrics-serving-cert - - name: cloud-credentials - secret: - items: - - key: clouds.yaml - path: clouds.yaml - secretName: manila-cloud-credentials - hostPath: path: /var/lib/kubelet/plugins/manila.csi.openstack.org type: DirectoryOrCreate @@ -228,13 +222,19 @@ spec: path: /var/lib/kubelet/plugins/csi-nfsplugin type: DirectoryOrCreate name: fwd-plugin-dir + - name: cloud-credentials + secret: + items: + - key: clouds.yaml + path: clouds.yaml + secretName: manila-cloud-credentials - configMap: items: - key: ca-bundle.pem path: ca-bundle.pem name: cloud-provider-config optional: true - name: cacert + name: legacy-cacert updateStrategy: rollingUpdate: maxUnavailable: 10% diff --git a/assets/overlays/openstack-manila/generated/standalone/controller.yaml b/assets/overlays/openstack-manila/generated/standalone/controller.yaml index 5a9497b87..ecaaa6170 100644 --- a/assets/overlays/openstack-manila/generated/standalone/controller.yaml +++ b/assets/overlays/openstack-manila/generated/standalone/controller.yaml @@ -110,11 +110,11 @@ spec: volumeMounts: - mountPath: /plugin name: socket-dir - - mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config - name: cacert - mountPath: /etc/openstack name: cloud-credentials readOnly: true + - mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config + name: legacy-cacert - args: - --nodeid=$(NODE_ID) - --endpoint=unix://plugin/csi-nfs.sock @@ -332,4 +332,4 @@ spec: path: ca-bundle.pem name: cloud-provider-config optional: true - name: cacert + name: legacy-cacert diff --git a/assets/overlays/openstack-manila/generated/standalone/node.yaml b/assets/overlays/openstack-manila/generated/standalone/node.yaml index 6c384a88d..1cab59539 100644 --- a/assets/overlays/openstack-manila/generated/standalone/node.yaml +++ b/assets/overlays/openstack-manila/generated/standalone/node.yaml @@ -82,19 +82,19 @@ spec: readOnlyRootFilesystem: true terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - - mountPath: /etc/openstack - name: cloud-credentials - readOnly: true - mountPath: /var/lib/kubelet/plugins/manila.csi.openstack.org name: plugin-dir - mountPath: /var/lib/kubelet/plugins/csi-nfsplugin name: fwd-plugin-dir - - mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config - name: cacert - mountPath: /etc/selinux name: etc-selinux - mountPath: /sys/fs name: sys-fs + - mountPath: /etc/openstack + name: cloud-credentials + readOnly: true + - mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config + name: legacy-cacert - args: - --csi-address=/csi/csi.sock - --http-endpoint=127.0.0.1:10305 @@ -214,12 +214,6 @@ spec: - name: metrics-serving-cert secret: secretName: manila-csi-driver-node-metrics-serving-cert - - name: cloud-credentials - secret: - items: - - key: clouds.yaml - path: clouds.yaml - secretName: manila-cloud-credentials - hostPath: path: /var/lib/kubelet/plugins/manila.csi.openstack.org type: DirectoryOrCreate @@ -228,13 +222,19 @@ spec: path: /var/lib/kubelet/plugins/csi-nfsplugin type: DirectoryOrCreate name: fwd-plugin-dir + - name: cloud-credentials + secret: + items: + - key: clouds.yaml + path: clouds.yaml + secretName: manila-cloud-credentials - configMap: items: - key: ca-bundle.pem path: ca-bundle.pem name: cloud-provider-config optional: true - name: cacert + name: legacy-cacert updateStrategy: rollingUpdate: maxUnavailable: 10% diff --git a/assets/overlays/openstack-manila/patches/controller_add_driver.yaml b/assets/overlays/openstack-manila/patches/controller_add_driver.yaml index e235db34b..d95519511 100644 --- a/assets/overlays/openstack-manila/patches/controller_add_driver.yaml +++ b/assets/overlays/openstack-manila/patches/controller_add_driver.yaml @@ -80,11 +80,12 @@ spec: volumeMounts: - name: socket-dir mountPath: /plugin - - name: cacert - mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config + # credentials and configuration - name: cloud-credentials mountPath: /etc/openstack readOnly: true + - name: legacy-cacert + mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config resources: requests: cpu: 10m @@ -114,23 +115,19 @@ spec: memory: 50Mi terminationMessagePolicy: FallbackToLogsOnError volumes: + - name: socket-dir + emptyDir: {} + # credentials and configuration - name: cloud-credentials secret: secretName: manila-cloud-credentials items: - key: clouds.yaml path: clouds.yaml - - name: socket-dir - emptyDir: {} - - name: cacert - # If present, extract ca-bundle.pem to - # /etc/kubernetes/static-pod-resources/configmaps/cloud-config - # Let the pod start when the ConfigMap does not exist or the certificate - # is not preset there. The certificate file will be created once the - # ConfigMap is created / the cerificate is added to it. + - name: legacy-cacert configMap: name: cloud-provider-config items: - - key: ca-bundle.pem - path: ca-bundle.pem + - key: ca-bundle.pem + path: ca-bundle.pem optional: true diff --git a/assets/overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml b/assets/overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml index 22e77fb09..ce21dc49b 100644 --- a/assets/overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml +++ b/assets/overlays/openstack-manila/patches/controller_use_hypershift_config_map.yaml @@ -8,4 +8,4 @@ spec: path: ca-bundle.pem name: openstack-cloud-config optional: true - name: cacert + name: legacy-cacert diff --git a/assets/overlays/openstack-manila/patches/node_add_driver.yaml b/assets/overlays/openstack-manila/patches/node_add_driver.yaml index 854bed3c1..68f918201 100644 --- a/assets/overlays/openstack-manila/patches/node_add_driver.yaml +++ b/assets/overlays/openstack-manila/patches/node_add_driver.yaml @@ -59,19 +59,20 @@ spec: - name: MANILA_SHARE_PROTO value: NFS volumeMounts: - - name: cloud-credentials - mountPath: /etc/openstack - readOnly: true - name: plugin-dir mountPath: /var/lib/kubelet/plugins/manila.csi.openstack.org - name: fwd-plugin-dir mountPath: /var/lib/kubelet/plugins/csi-nfsplugin - - name: cacert - mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config - name: etc-selinux mountPath: /etc/selinux - name: sys-fs mountPath: /sys/fs + # credentials and configuration + - name: cloud-credentials + mountPath: /etc/openstack + readOnly: true + - name: legacy-cacert + mountPath: /etc/kubernetes/static-pod-resources/configmaps/cloud-config ports: - name: healthz containerPort: 10305 @@ -113,12 +114,6 @@ spec: - name: fwd-plugin-dir mountPath: /var/lib/kubelet/plugins/csi-nfsplugin volumes: - - name: cloud-credentials - secret: - secretName: manila-cloud-credentials - items: - - key: clouds.yaml - path: clouds.yaml - name: registration-dir hostPath: path: /var/lib/kubelet/plugins_registry/ @@ -131,17 +126,6 @@ spec: hostPath: path: /var/lib/kubelet/plugins/csi-nfsplugin type: DirectoryOrCreate - - name: cacert - # Extract ca-bundle.pem to /etc/kubernetes/static-pod-resources/configmaps/cloud-config if present. - # Let the pod start when the ConfigMap does not exist or the certificate - # is not preset there. The certificate file will be created once the - # ConfigMap is created / the cerificate is added to it. - configMap: - name: cloud-provider-config - items: - - key: ca-bundle.pem - path: ca-bundle.pem - optional: true - name: etc-selinux hostPath: path: /etc/selinux @@ -150,3 +134,17 @@ spec: hostPath: path: /sys/fs type: Directory + # credentials and configuration + - name: cloud-credentials + secret: + secretName: manila-cloud-credentials + items: + - key: clouds.yaml + path: clouds.yaml + - name: legacy-cacert + configMap: + name: cloud-provider-config + items: + - key: ca-bundle.pem + path: ca-bundle.pem + optional: true From 80743b8b63816bdf2a2cd13bd4c8844f6577c8cb Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 13 Mar 2025 11:09:17 +0000 Subject: [PATCH 5/5] openstack-manila: Consume CA cert from credentials secret (assets) 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 --- .../generated/hypershift/controller.yaml | 18 +++++++++++++----- .../generated/hypershift/node.yaml | 18 +++++++++++++----- .../generated/standalone/controller.yaml | 18 +++++++++++++----- .../generated/standalone/node.yaml | 18 +++++++++++++----- .../patches/controller_add_driver.yaml | 18 +++++++++++++----- .../patches/node_add_driver.yaml | 18 +++++++++++++----- pkg/openstack-manila/util/const.go | 2 +- 7 files changed, 79 insertions(+), 31 deletions(-) diff --git a/assets/overlays/openstack-manila/generated/hypershift/controller.yaml b/assets/overlays/openstack-manila/generated/hypershift/controller.yaml index 105a2ab85..bcf1d08f4 100644 --- a/assets/overlays/openstack-manila/generated/hypershift/controller.yaml +++ b/assets/overlays/openstack-manila/generated/hypershift/controller.yaml @@ -378,11 +378,19 @@ spec: secret: secretName: manila-csi-driver-controller-metrics-serving-cert - name: cloud-credentials - secret: - items: - - key: clouds.yaml - path: clouds.yaml - secretName: manila-cloud-credentials + projected: + sources: + - secret: + items: + - key: clouds.yaml + path: clouds.yaml + name: manila-cloud-credentials + - secret: + items: + - key: cacert + path: ca.crt + name: manila-cloud-credentials + optional: true - configMap: items: - key: ca-bundle.pem diff --git a/assets/overlays/openstack-manila/generated/hypershift/node.yaml b/assets/overlays/openstack-manila/generated/hypershift/node.yaml index 1cab59539..01c407e14 100644 --- a/assets/overlays/openstack-manila/generated/hypershift/node.yaml +++ b/assets/overlays/openstack-manila/generated/hypershift/node.yaml @@ -223,11 +223,19 @@ spec: type: DirectoryOrCreate name: fwd-plugin-dir - name: cloud-credentials - secret: - items: - - key: clouds.yaml - path: clouds.yaml - secretName: manila-cloud-credentials + projected: + sources: + - secret: + items: + - key: clouds.yaml + path: clouds.yaml + name: manila-cloud-credentials + - secret: + items: + - key: cacert + path: ca.crt + name: manila-cloud-credentials + optional: true - configMap: items: - key: ca-bundle.pem diff --git a/assets/overlays/openstack-manila/generated/standalone/controller.yaml b/assets/overlays/openstack-manila/generated/standalone/controller.yaml index ecaaa6170..c4b83e60c 100644 --- a/assets/overlays/openstack-manila/generated/standalone/controller.yaml +++ b/assets/overlays/openstack-manila/generated/standalone/controller.yaml @@ -321,11 +321,19 @@ spec: secret: secretName: manila-csi-driver-controller-metrics-serving-cert - name: cloud-credentials - secret: - items: - - key: clouds.yaml - path: clouds.yaml - secretName: manila-cloud-credentials + projected: + sources: + - secret: + items: + - key: clouds.yaml + path: clouds.yaml + name: manila-cloud-credentials + - secret: + items: + - key: cacert + path: ca.crt + name: manila-cloud-credentials + optional: true - configMap: items: - key: ca-bundle.pem diff --git a/assets/overlays/openstack-manila/generated/standalone/node.yaml b/assets/overlays/openstack-manila/generated/standalone/node.yaml index 1cab59539..01c407e14 100644 --- a/assets/overlays/openstack-manila/generated/standalone/node.yaml +++ b/assets/overlays/openstack-manila/generated/standalone/node.yaml @@ -223,11 +223,19 @@ spec: type: DirectoryOrCreate name: fwd-plugin-dir - name: cloud-credentials - secret: - items: - - key: clouds.yaml - path: clouds.yaml - secretName: manila-cloud-credentials + projected: + sources: + - secret: + items: + - key: clouds.yaml + path: clouds.yaml + name: manila-cloud-credentials + - secret: + items: + - key: cacert + path: ca.crt + name: manila-cloud-credentials + optional: true - configMap: items: - key: ca-bundle.pem diff --git a/assets/overlays/openstack-manila/patches/controller_add_driver.yaml b/assets/overlays/openstack-manila/patches/controller_add_driver.yaml index d95519511..323cc0176 100644 --- a/assets/overlays/openstack-manila/patches/controller_add_driver.yaml +++ b/assets/overlays/openstack-manila/patches/controller_add_driver.yaml @@ -119,11 +119,19 @@ spec: emptyDir: {} # credentials and configuration - name: cloud-credentials - secret: - secretName: manila-cloud-credentials - items: - - key: clouds.yaml - path: clouds.yaml + projected: + sources: + - secret: + items: + - key: clouds.yaml + path: clouds.yaml + name: manila-cloud-credentials + - secret: + items: + - key: cacert + path: ca.crt + name: manila-cloud-credentials + optional: true - name: legacy-cacert configMap: name: cloud-provider-config diff --git a/assets/overlays/openstack-manila/patches/node_add_driver.yaml b/assets/overlays/openstack-manila/patches/node_add_driver.yaml index 68f918201..576ae69ad 100644 --- a/assets/overlays/openstack-manila/patches/node_add_driver.yaml +++ b/assets/overlays/openstack-manila/patches/node_add_driver.yaml @@ -136,11 +136,19 @@ spec: type: Directory # credentials and configuration - name: cloud-credentials - secret: - secretName: manila-cloud-credentials - items: - - key: clouds.yaml - path: clouds.yaml + projected: + sources: + - secret: + items: + - key: clouds.yaml + path: clouds.yaml + name: manila-cloud-credentials + - secret: + items: + - key: cacert + path: ca.crt + name: manila-cloud-credentials + optional: true - name: legacy-cacert configMap: name: cloud-provider-config diff --git a/pkg/openstack-manila/util/const.go b/pkg/openstack-manila/util/const.go index 872b1ee2e..e94e7728d 100644 --- a/pkg/openstack-manila/util/const.go +++ b/pkg/openstack-manila/util/const.go @@ -1,7 +1,7 @@ package util const ( - ManilaSecretName = "csi-manila-secrets" + ManilaSecretName = "csi-manila-secrets" CloudConfigNamespace = "openshift-config" CloudConfigName = "cloud-provider-config"