You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
### Create a csi-cinder-nodeplugin daemonset per cluster openstack
140
75
141
-
Daemonsets should deploy pods on nodes from proper openstack context. We suppose that the node have a label `topology.kubernetes.io/region` with the openstack cluster name as value (you could manage this with kubespray, manually, whatever, it should be great to implement this in openstack cloud controller manager).
76
+
Daemonsets should deploy pods on nodes from proper openstack context. We suppose that the node have a label `topology.kubernetes.io/zone` with the openstack cluster name as value (you could manage this with kubespray, manually, whatever, it should be great to implement this in openstack cloud controller manager).
142
77
143
78
Do as follows:
144
79
- Use nodeSelector to match proper nodes labels
145
-
- Add cli argument `--additional-topology topology.kubernetes.io/region=region-one`, which should match node labels, to container cinder-csi-plugin
146
-
- Add cli argument `--cloud-name="region-one"`, which should match configuration file subsection name, to container cinder-csi-plugin.
80
+
- Add cli argument `--additional-topology topology.kubernetes.io/zone=zone-one`, which should match node labels, to container cinder-csi-plugin
81
+
- Add cli argument `--cloud-name="zone-one"`, which should match configuration file subsection name, to container cinder-csi-plugin.
147
82
148
83
```yaml
149
84
apiVersion: apps/v1
150
85
kind: DaemonSet
151
86
metadata:
152
-
name: csi-cinder-nodeplugin-region-one
87
+
name: csi-cinder-nodeplugin-zone-one
153
88
namespace: kube-system
154
89
spec:
155
90
selector:
156
91
matchLabels:
157
-
app: csi-cinder-nodeplugin-region-one
92
+
app: csi-cinder-nodeplugin-zone-one
158
93
template:
159
94
metadata:
160
95
labels:
161
-
app: csi-cinder-nodeplugin-region-one
96
+
app: csi-cinder-nodeplugin-zone-one
162
97
spec:
163
98
containers:
164
99
- name: node-driver-registrar
@@ -171,9 +106,9 @@ spec:
171
106
- /bin/cinder-csi-plugin
172
107
- --endpoint=$(CSI_ENDPOINT)
173
108
- --cloud-config=$(CLOUD_CONFIG)
174
-
- --cloud-name="region-one"
109
+
- --cloud-name="zone-one"
175
110
- --additional-topology
176
-
- topology.kubernetes.io/region=region-one
111
+
- topology.kubernetes.io/zone=zone-one
177
112
env:
178
113
- name: CSI_ENDPOINT
179
114
value: unix://csi/csi.sock
@@ -187,7 +122,7 @@ spec:
187
122
readOnly: true
188
123
...
189
124
nodeSelector:
190
-
topology.kubernetes.io/region: region-one
125
+
topology.kubernetes.io/zone: zone-one
191
126
volumes:
192
127
...
193
128
- name: secret-cinderplugin
@@ -199,16 +134,16 @@ spec:
199
134
apiVersion: apps/v1
200
135
kind: DaemonSet
201
136
metadata:
202
-
name: csi-cinder-nodeplugin-region-two
137
+
name: csi-cinder-nodeplugin-zone-two
203
138
namespace: kube-system
204
139
spec:
205
140
selector:
206
141
matchLabels:
207
-
app: csi-cinder-nodeplugin-region-two
142
+
app: csi-cinder-nodeplugin-zone-two
208
143
template:
209
144
metadata:
210
145
labels:
211
-
app: csi-cinder-nodeplugin-region-two
146
+
app: csi-cinder-nodeplugin-zone-two
212
147
spec:
213
148
containers:
214
149
- name: node-driver-registrar
@@ -221,9 +156,9 @@ spec:
221
156
- /bin/cinder-csi-plugin
222
157
- --endpoint=$(CSI_ENDPOINT)
223
158
- --cloud-config=$(CLOUD_CONFIG)
224
-
- --cloud-name="region-two"
159
+
- --cloud-name="zone-two"
225
160
- --additional-topology
226
-
- topology.kubernetes.io/region=region-two
161
+
- topology.kubernetes.io/zone=zone-two
227
162
env:
228
163
- name: CSI_ENDPOINT
229
164
value: unix://csi/csi.sock
@@ -237,7 +172,7 @@ spec:
237
172
readOnly: true
238
173
...
239
174
nodeSelector:
240
-
topology.kubernetes.io/region: region-two
175
+
topology.kubernetes.io/zone: zone-two
241
176
volumes:
242
177
...
243
178
- name: secret-cinderplugin
@@ -251,7 +186,7 @@ spec:
251
186
252
187
Enable Topology feature-gate on container csi-provisioner of csi-cinder-controllerplugin deployment by adding cli argument ``--feature-gates="Topology=true"
253
188
254
-
Add cli argument `--cloud-name="region-one"` for each managed openstack cluster, name should match configuration file subsection name, to container `cinder-csi-plugin`.
189
+
Add cli argument `--cloud-name="zone-one"` for each managed openstack cluster, name should match configuration file subsection name, to container `cinder-csi-plugin`.
0 commit comments