2
2
3
3
### Multi cluster Configuration file
4
4
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.
6
6
7
7
Example of configuration with 3 regions (The default is backward compatible with mono cluster configuration but not mandatory).
8
8
``` yaml
@@ -16,7 +16,7 @@ stringData:
16
16
cloud.conf : |-
17
17
[BlockStorage]
18
18
bs-version=v3
19
- ignore-volume-az=True
19
+ ignore-volume-az=false
20
20
21
21
[Global]
22
22
auth-url="https://auth.cloud.openstackcluster.region-default.local/v3"
@@ -47,33 +47,6 @@ stringData:
47
47
` ` `
48
48
49
49
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
-
77
50
### Create storage Class for dedicated cluster
78
51
79
52
` ` ` yaml
@@ -82,7 +55,7 @@ kind: StorageClass
82
55
metadata :
83
56
annotations :
84
57
storageclass.kubernetes.io/is-default-class : " true"
85
- name: sc-region-one
58
+ name : sc-multi-regions
86
59
allowVolumeExpansion : true
87
60
allowedTopologies :
88
61
- matchLabelExpressions :
@@ -92,45 +65,7 @@ allowedTopologies:
92
65
- key : topology.kubernetes.io/region
93
66
values :
94
67
- 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:
122
68
- 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
134
69
provisioner : cinder.csi.openstack.org
135
70
reclaimPolicy : Delete
136
71
volumeBindingMode : Immediate
0 commit comments