22
33### Multi cluster Configuration file
44
5- Create a configuration file with a subsection per openstack cluster to manage (pay attention to enable ignore-volume-az in BlockStorage section) .
5+ Create a configuration file with a subsection per openstack cluster to manage.
66
77Example of configuration with 3 regions (The default is backward compatible with mono cluster configuration but not mandatory).
88``` yaml
@@ -16,7 +16,7 @@ stringData:
1616 cloud.conf : |-
1717 [BlockStorage]
1818 bs-version=v3
19- ignore-volume-az=True
19+ ignore-volume-az=false
2020
2121 [Global]
2222 auth-url="https://auth.cloud.openstackcluster.region-default.local/v3"
@@ -47,33 +47,6 @@ stringData:
4747` ` `
4848
4949
50-
51- ### Create region/cloud secrets
52-
53- Create a secret per openstack cluster which contains a key ` cloud` and as value the subsection's name of corresponding openstack cluster in configuration file.
54-
55- These secrets are referenced in storageClass definitions to identify openstack cluster associated to the storageClass.
56-
57- ` ` ` yaml
58- apiVersion: v1
59- kind: Secret
60- metadata:
61- name: openstack-config-region-one
62- namespace: kube-system
63- type: Opaque
64- stringData:
65- cloud: region-one
66- ---
67- apiVersion: v1
68- kind: Secret
69- metadata:
70- name: openstack-config-region-two
71- namespace: kube-system
72- type: Opaque
73- stringData:
74- cloud: region-two
75- ` ` `
76-
7750### Create storage Class for dedicated cluster
7851
7952` ` ` yaml
@@ -82,7 +55,7 @@ kind: StorageClass
8255metadata :
8356 annotations :
8457 storageclass.kubernetes.io/is-default-class : " true"
85- name: sc-region-one
58+ name : sc-multi-regions
8659allowVolumeExpansion : true
8760allowedTopologies :
8861- matchLabelExpressions :
@@ -92,45 +65,7 @@ allowedTopologies:
9265 - key : topology.kubernetes.io/region
9366 values :
9467 - region-one
95- parameters:
96- csi.storage.k8s.io/controller-publish-secret-name: openstack-config-region-one
97- csi.storage.k8s.io/controller-publish-secret-namespace: kube-system
98- csi.storage.k8s.io/node-publish-secret-name: openstack-config-region-one
99- csi.storage.k8s.io/node-publish-secret-namespace: kube-system
100- csi.storage.k8s.io/node-stage-secret-name: openstack-config-region-one
101- csi.storage.k8s.io/node-stage-secret-namespace: kube-system
102- csi.storage.k8s.io/provisioner-secret-name: openstack-config-region-one
103- csi.storage.k8s.io/provisioner-secret-namespace: kube-system
104- csi.storage.k8s.io/controller-expand-secret-name: openstack-config-region-one
105- csi.storage.k8s.io/controller-expand-secret-namespace: kube-system
106- provisioner: cinder.csi.openstack.org
107- reclaimPolicy: Delete
108- volumeBindingMode: Immediate
109- ---
110- apiVersion: storage.k8s.io/v1
111- kind: StorageClass
112- metadata:
113- name: sc-region-two
114- allowVolumeExpansion: true
115- allowedTopologies:
116- - matchLabelExpressions:
117- - key: topology.cinder.csi.openstack.org/zone
118- values:
119- - nova
120- - key: topology.kubernetes.io/region
121- values:
12268 - region-two
123- parameters:
124- csi.storage.k8s.io/controller-publish-secret-name: openstack-config-region-two
125- csi.storage.k8s.io/controller-publish-secret-namespace: kube-system
126- csi.storage.k8s.io/node-publish-secret-name: openstack-config-region-two
127- csi.storage.k8s.io/node-publish-secret-namespace: kube-system
128- csi.storage.k8s.io/node-stage-secret-name: openstack-config-region-two
129- csi.storage.k8s.io/node-stage-secret-namespace: kube-system
130- csi.storage.k8s.io/provisioner-secret-name: openstack-config-region-two
131- csi.storage.k8s.io/provisioner-secret-namespace: kube-system
132- csi.storage.k8s.io/controller-expand-secret-name: openstack-config-region-two
133- csi.storage.k8s.io/controller-expand-secret-namespace: kube-system
13469provisioner : cinder.csi.openstack.org
13570reclaimPolicy : Delete
13671volumeBindingMode : Immediate
0 commit comments