Skip to content

Commit 41b0cbd

Browse files
authored
Fix(deploy): Update the csi-provisioner version to v3.0.0 (#137)
Signed-off-by: w3aman <[email protected]>
1 parent 636b970 commit 41b0cbd

File tree

3 files changed

+41
-7
lines changed

3 files changed

+41
-7
lines changed

deploy/lvm-operator.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,8 @@ spec:
446446
# do not require volumeattachment
447447
attachRequired: false
448448
podInfoOnMount: true
449+
storageCapacity: true
450+
449451
---
450452

451453
apiVersion: apiextensions.k8s.io/v1
@@ -1196,7 +1198,7 @@ spec:
11961198
serviceAccount: openebs-lvm-controller-sa
11971199
containers:
11981200
- name: csi-resizer
1199-
image: k8s.gcr.io/sig-storage/csi-resizer:v1.1.0
1201+
image: k8s.gcr.io/sig-storage/csi-resizer:v1.2.0
12001202
args:
12011203
- "--v=5"
12021204
- "--csi-address=$(ADDRESS)"
@@ -1227,7 +1229,7 @@ spec:
12271229
- "--leader-election=true"
12281230
imagePullPolicy: IfNotPresent
12291231
- name: csi-provisioner
1230-
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.1.0
1232+
image: k8s.gcr.io/sig-storage/csi-provisioner:v3.0.0
12311233
imagePullPolicy: IfNotPresent
12321234
args:
12331235
- "--csi-address=$(ADDRESS)"
@@ -1236,10 +1238,19 @@ spec:
12361238
- "--strict-topology"
12371239
- "--leader-election"
12381240
- "--extra-create-metadata=true"
1241+
- "--enable-capacity=true"
12391242
- "--default-fstype=ext4"
12401243
env:
12411244
- name: ADDRESS
12421245
value: /var/lib/csi/sockets/pluginproxy/csi.sock
1246+
- name: NAMESPACE
1247+
valueFrom:
1248+
fieldRef:
1249+
fieldPath: metadata.namespace
1250+
- name: POD_NAME
1251+
valueFrom:
1252+
fieldRef:
1253+
fieldPath: metadata.name
12431254
volumeMounts:
12441255
- name: socket-dir
12451256
mountPath: /var/lib/csi/sockets/pluginproxy/
@@ -1410,7 +1421,7 @@ spec:
14101421
hostNetwork: true
14111422
containers:
14121423
- name: csi-node-driver-registrar
1413-
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.1.0
1424+
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0
14141425
imagePullPolicy: IfNotPresent
14151426
args:
14161427
- "--v=5"

deploy/yamls/lvm-driver.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ spec:
1010
# do not require volumeattachment
1111
attachRequired: false
1212
podInfoOnMount: true
13+
storageCapacity: true
14+
1315
---
1416

1517
apiVersion: apiextensions.k8s.io/v1
@@ -762,7 +764,7 @@ spec:
762764
serviceAccount: openebs-lvm-controller-sa
763765
containers:
764766
- name: csi-resizer
765-
image: k8s.gcr.io/sig-storage/csi-resizer:v1.1.0
767+
image: k8s.gcr.io/sig-storage/csi-resizer:v1.2.0
766768
args:
767769
- "--v=5"
768770
- "--csi-address=$(ADDRESS)"
@@ -793,7 +795,7 @@ spec:
793795
- "--leader-election=true"
794796
imagePullPolicy: IfNotPresent
795797
- name: csi-provisioner
796-
image: k8s.gcr.io/sig-storage/csi-provisioner:v2.1.0
798+
image: k8s.gcr.io/sig-storage/csi-provisioner:v3.0.0
797799
imagePullPolicy: IfNotPresent
798800
args:
799801
- "--csi-address=$(ADDRESS)"
@@ -802,10 +804,19 @@ spec:
802804
- "--strict-topology"
803805
- "--leader-election"
804806
- "--extra-create-metadata=true"
807+
- "--enable-capacity=true"
805808
- "--default-fstype=ext4"
806809
env:
807810
- name: ADDRESS
808811
value: /var/lib/csi/sockets/pluginproxy/csi.sock
812+
- name: NAMESPACE
813+
valueFrom:
814+
fieldRef:
815+
fieldPath: metadata.namespace
816+
- name: POD_NAME
817+
valueFrom:
818+
fieldRef:
819+
fieldPath: metadata.name
809820
volumeMounts:
810821
- name: socket-dir
811822
mountPath: /var/lib/csi/sockets/pluginproxy/
@@ -976,7 +987,7 @@ spec:
976987
hostNetwork: true
977988
containers:
978989
- name: csi-node-driver-registrar
979-
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.1.0
990+
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.3.0
980991
imagePullPolicy: IfNotPresent
981992
args:
982993
- "--v=5"

upgrade/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,16 @@ spec:
7474
replicas: 1 // update it to desired lvm-controller replicas.
7575
```
7676

77-
4. Now we can apply the lvm-operator.yaml file to upgrade lvm-driver to 0.7.0 version.
77+
4. Now we can apply the lvm-operator.yaml file to upgrade lvm-driver to 0.7.0 version.
78+
79+
### *Note*
80+
81+
While upgrading lvm-driver from v0.8.0 to later version by applying lvm-operator file, we may get this error.
82+
```
83+
The CSIDriver "local.csi.openebs.io" is invalid: spec.storageCapacity: Invalid value: true: field is immutable
84+
```
85+
It occurs due to newly added field `storageCapacity: true` in csi driver spec. In that case, first delete the csi-driver by running this command:
86+
```
87+
$ kubectl delete csidriver local.csi.openebs.io
88+
```
89+
Now we can again apply the operator yaml file.

0 commit comments

Comments
 (0)