Repository: rook/rook
Pull request #10005 (2022-04-06 14:01:50)

csi: update cephcsi to v3.6.0 release (backport #10002)
This is an automatic backport of pull request #10002 done by [Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the [documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com/) you can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>



Patch:
diff --git a/Documentation/ceph-upgrade.md b/Documentation/ceph-upgrade.md
index c625c17ad..31cbfec3c 100644
--- a/Documentation/ceph-upgrade.md
+++ b/Documentation/ceph-upgrade.md
@@ -547,7 +547,7 @@ kubectl -n $ROOK_OPERATOR_NAMESPACE edit configmap rook-ceph-operator-config
 The default upstream images are included below, which you can change to your desired images.
 
 ```yaml
-ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.5.1"
+ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.6.0"
 ROOK_CSI_REGISTRAR_IMAGE: "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0"
 ROOK_CSI_PROVISIONER_IMAGE: "k8s.gcr.io/sig-storage/csi-provisioner:v3.1.0"
 ROOK_CSI_ATTACHER_IMAGE: "k8s.gcr.io/sig-storage/csi-attacher:v3.4.0"
@@ -578,7 +578,7 @@ k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0
 k8s.gcr.io/sig-storage/csi-provisioner:v3.1.0
 k8s.gcr.io/sig-storage/csi-resizer:v1.4.0
 k8s.gcr.io/sig-storage/csi-snapshotter:v5.0.1
-quay.io/cephcsi/cephcsi:v3.5.1
+quay.io/cephcsi/cephcsi:v3.6.0
 quay.io/csiaddons/volumereplication-operator:v0.3.0
 quay.io/csiaddons/k8s-sidecar:v0.2.1
 ```
diff --git a/Documentation/helm-operator.md b/Documentation/helm-operator.md
index fcc774754..6fea094cc 100644
--- a/Documentation/helm-operator.md
+++ b/Documentation/helm-operator.md
@@ -134,7 +134,7 @@ The following tables lists the configurable parameters of the rook-operator char
 | `csi.rbdLivenessMetricsPort`        | Ceph CSI RBD driver metrics port.                                                                                           | `8080`                                                    |
 | `csi.forceCephFSKernelClient`       | Enable Ceph Kernel clients on kernel < 4.17 which support quotas for Cephfs.                                                | `true`                                                    |
 | `csi.kubeletDirPath`                | Kubelet root directory path (if the Kubelet uses a different path for the `--root-dir` flag)                                | `/var/lib/kubelet`                                        |
-| `csi.cephcsi.image`                 | Ceph CSI image.                                                                                                             | `quay.io/cephcsi/cephcsi:v3.5.1`                          |
+| `csi.cephcsi.image`                 | Ceph CSI image.                                                                                                             | `quay.io/cephcsi/cephcsi:v3.6.0`                          |
 | `csi.rbdPluginUpdateStrategy`       | CSI Rbd plugin daemonset update strategy, supported values are OnDelete and RollingUpdate.                                  | `OnDelete`                                                |
 | `csi.cephFSPluginUpdateStrategy`    | CSI CephFS plugin daemonset update strategy, supported values are OnDelete and RollingUpdate.                               | `OnDelete`                                                |
 | `csi.registrar.image`               | Kubernetes CSI registrar image.                                                                                             | `k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0` |
diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml
index 09165cac7..dc11aab2e 100644
--- a/deploy/charts/rook-ceph/values.yaml
+++ b/deploy/charts/rook-ceph/values.yaml
@@ -278,7 +278,7 @@ csi:
   #rbdLivenessMetricsPort: 9080
   #kubeletDirPath: /var/lib/kubelet
   #cephcsi:
-    #image: quay.io/cephcsi/cephcsi:v3.5.1
+    #image: quay.io/cephcsi/cephcsi:v3.6.0
   #registrar:
     #image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0
   #provisioner:
diff --git a/deploy/examples/images.txt b/deploy/examples/images.txt
index 3c113d51f..bd89bce07 100644
--- a/deploy/examples/images.txt
+++ b/deploy/examples/images.txt
@@ -4,7 +4,7 @@
  k8s.gcr.io/sig-storage/csi-resizer:v1.4.0
  k8s.gcr.io/sig-storage/csi-snapshotter:v5.0.1
  quay.io/ceph/ceph:v16.2.7
- quay.io/cephcsi/cephcsi:v3.5.1
+ quay.io/cephcsi/cephcsi:v3.6.0
  quay.io/csiaddons/k8s-sidecar:v0.2.1
  quay.io/csiaddons/volumereplication-operator:v0.3.0
  rook/ceph:v1.9.0-beta.0
diff --git a/deploy/examples/operator-openshift.yaml b/deploy/examples/operator-openshift.yaml
index b421619b6..d4b69f861 100644
--- a/deploy/examples/operator-openshift.yaml
+++ b/deploy/examples/operator-openshift.yaml
@@ -162,7 +162,7 @@ data:
   # The default version of CSI supported by Rook will be started. To change the version
   # of the CSI driver to something other than what is officially supported, change
   # these images to the desired release of the CSI driver.
-  # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.5.1"
+  # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.6.0"
   # ROOK_CSI_REGISTRAR_IMAGE: "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0"
   # ROOK_CSI_RESIZER_IMAGE: "k8s.gcr.io/sig-storage/csi-resizer:v1.4.0"
   # ROOK_CSI_PROVISIONER_IMAGE: "k8s.gcr.io/sig-storage/csi-provisioner:v3.1.0"
diff --git a/deploy/examples/operator.yaml b/deploy/examples/operator.yaml
index 540899877..e380146d4 100644
--- a/deploy/examples/operator.yaml
+++ b/deploy/examples/operator.yaml
@@ -79,7 +79,7 @@ data:
   # The default version of CSI supported by Rook will be started. To change the version
   # of the CSI driver to something other than what is officially supported, change
   # these images to the desired release of the CSI driver.
-  # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.5.1"
+  # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.6.0"
   # ROOK_CSI_REGISTRAR_IMAGE: "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0"
   # ROOK_CSI_RESIZER_IMAGE: "k8s.gcr.io/sig-storage/csi-resizer:v1.4.0"
   # ROOK_CSI_PROVISIONER_IMAGE: "k8s.gcr.io/sig-storage/csi-provisioner:v3.1.0"
diff --git a/pkg/operator/ceph/csi/spec.go b/pkg/operator/ceph/csi/spec.go
index 7c6fc1564..3f052123c 100644
--- a/pkg/operator/ceph/csi/spec.go
+++ b/pkg/operator/ceph/csi/spec.go
@@ -104,7 +104,7 @@ var (
 // manually challenging.
 var (
 	// image names
-	DefaultCSIPluginImage         = "quay.io/cephcsi/cephcsi:v3.5.1"
+	DefaultCSIPluginImage         = "quay.io/cephcsi/cephcsi:v3.6.0"
 	DefaultRegistrarImage         = "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0"
 	DefaultProvisionerImage       = "k8s.gcr.io/sig-storage/csi-provisioner:v3.1.0"
 	DefaultAttacherImage          = "k8s.gcr.io/sig-storage/csi-attacher:v3.4.0"
diff --git a/pkg/operator/ceph/csi/version.go b/pkg/operator/ceph/csi/version.go
index a5c277c9e..19ea488d5 100644
--- a/pkg/operator/ceph/csi/version.go
+++ b/pkg/operator/ceph/csi/version.go
@@ -25,15 +25,16 @@ import (
 )
 
 var (
-	//minimum supported version is 3.4.0
-	minimum = CephCSIVersion{3, 4, 0}
+	//minimum supported version is 3.5.0
+	minimum = CephCSIVersion{3, 5, 0}
 	//supportedCSIVersions are versions that rook supports
-	releasev340          = CephCSIVersion{3, 4, 0}
-	releasev350          = CephCSIVersion{3, 5, 0}
+	releasev350 = CephCSIVersion{3, 5, 0}
+	releasev360 = CephCSIVersion{3, 6, 0}
+
 	supportedCSIVersions = []CephCSIVersion{
 		minimum,
-		releasev340,
 		releasev350,
+		releasev360,
 	}
 
 	// custom ceph.conf is supported in v3.5.0+


Test patch:
diff --git a/pkg/operator/ceph/csi/version_test.go b/pkg/operator/ceph/csi/version_test.go
index eb987420a..e3a774350 100644
--- a/pkg/operator/ceph/csi/version_test.go
+++ b/pkg/operator/ceph/csi/version_test.go
@@ -23,9 +23,10 @@ import (
 )
 
 var (
-	testMinVersion         = CephCSIVersion{3, 4, 0}
+	testMinVersion         = CephCSIVersion{3, 5, 0}
 	testReleaseV340        = CephCSIVersion{3, 4, 0}
 	testReleaseV350        = CephCSIVersion{3, 5, 0}
+	testReleaseV360        = CephCSIVersion{3, 6, 0}
 	testVersionUnsupported = CephCSIVersion{4, 0, 0}
 )
 
@@ -39,15 +40,15 @@ func TestIsAtLeast(t *testing.T) {
 	ret = testMinVersion.isAtLeast(&testMinVersion)
 	assert.Equal(t, true, ret)
 
-	// Test version which is equal
-	ret = testReleaseV340.isAtLeast(&testReleaseV340)
-	assert.Equal(t, true, ret)
-
 	// Test for 3.5.0
 	// Test version which is lesser
 	ret = testReleaseV350.isAtLeast(&testReleaseV340)
 	assert.Equal(t, true, ret)
 
+	// Test for 3.6.0
+	ret = testReleaseV360.isAtLeast(&testReleaseV360)
+	assert.Equal(t, true, ret)
+
 }
 
 func TestSupported(t *testing.T) {
@@ -59,10 +60,13 @@ func TestSupported(t *testing.T) {
 	assert.Equal(t, false, ret)
 
 	ret = testReleaseV340.Supported()
-	assert.Equal(t, true, ret)
+	assert.Equal(t, false, ret)
 
 	ret = testReleaseV350.Supported()
 	assert.Equal(t, true, ret)
+
+	ret = testReleaseV360.Supported()
+	assert.Equal(t, true, ret)
 }
 
 func Test_extractCephCSIVersion(t *testing.T) {
@@ -97,11 +101,14 @@ func TestSupportsCustomCephConf(t *testing.T) {
 
 	AllowUnsupported = false
 	ret = testMinVersion.SupportsCustomCephConf()
-	assert.False(t, ret)
+	assert.True(t, ret)
 
 	ret = testReleaseV340.SupportsCustomCephConf()
 	assert.False(t, ret)
 
 	ret = testReleaseV350.SupportsCustomCephConf()
 	assert.True(t, ret)
+
+	ret = testReleaseV360.SupportsCustomCephConf()
+	assert.True(t, ret)
 }