From 02c4c5879c51389b981fa793cb4d65c4bedef2d3 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 23 Aug 2022 07:53:35 +0530 Subject: [PATCH] csi: update cephcsi to v3.7.0 release As cephcsi v3.7.0 is released updating CephCSI to v3.7.0 in Rook and defaulting the minimum version to v3.7.0 Signed-off-by: Madhu Rajanna (cherry picked from commit 52d410a99b4da6272488fa404938056b2235ba5c) --- Documentation/Helm-Charts/operator-chart.md | 2 +- .../Ceph-CSI/custom-images.md | 2 +- deploy/charts/rook-ceph/values.yaml | 2 +- deploy/examples/images.txt | 2 +- deploy/examples/operator-openshift.yaml | 2 +- pkg/operator/ceph/csi/spec.go | 2 +- pkg/operator/ceph/csi/version.go | 10 +++--- pkg/operator/ceph/csi/version_test.go | 35 ++++++++++--------- 8 files changed, 29 insertions(+), 28 deletions(-) diff --git a/Documentation/Helm-Charts/operator-chart.md b/Documentation/Helm-Charts/operator-chart.md index ce9ab8bfa..7a9769e34 100644 --- a/Documentation/Helm-Charts/operator-chart.md +++ b/Documentation/Helm-Charts/operator-chart.md @@ -111,7 +111,7 @@ The following tables lists the configurable parameters of the rook-operator char | `csi.enableLiveness` | Enable Ceph CSI Liveness sidecar deployment. | `false` | | `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.6.2` | +| `csi.cephcsi.image` | Ceph CSI image. | `quay.io/cephcsi/cephcsi:v3.7.0` | | `csi.rbdPluginUpdateStrategy` | CSI Rbd plugin daemonset update strategy, supported values are OnDelete and RollingUpdate. | `RollingUpdate` | | `csi.cephFSPluginUpdateStrategy` | CSI CephFS plugin daemonset update strategy, supported values are OnDelete and RollingUpdate. | `RollingUpdate` | | `csi.nfsPluginUpdateStrategy` | CSI NFS plugin daemonset update strategy, supported values are OnDelete and RollingUpdate. | `RollingUpdate` | diff --git a/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md b/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md index 87629a2ad..024cb8cdc 100644 --- a/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md +++ b/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md @@ -18,7 +18,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.6.2" +ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.7.0" ROOK_CSI_REGISTRAR_IMAGE: "k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.1" 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" diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml index 47cac5fd6..77e28f0d7 100644 --- a/deploy/charts/rook-ceph/values.yaml +++ b/deploy/charts/rook-ceph/values.yaml @@ -352,7 +352,7 @@ csi: #rbdLivenessMetricsPort: 9080 #kubeletDirPath: /var/lib/kubelet #cephcsi: - #image: quay.io/cephcsi/cephcsi:v3.6.2 + #image: quay.io/cephcsi/cephcsi:v3.7.0 #registrar: #image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1 #provisioner: diff --git a/deploy/examples/images.txt b/deploy/examples/images.txt index 7ad31e213..a48b72f9d 100644 --- a/deploy/examples/images.txt +++ b/deploy/examples/images.txt @@ -1,5 +1,5 @@ quay.io/ceph/ceph:v17.2.3 - quay.io/cephcsi/cephcsi:v3.6.2 + quay.io/cephcsi/cephcsi:v3.7.0 quay.io/csiaddons/k8s-sidecar:v0.4.0 quay.io/csiaddons/volumereplication-operator:v0.3.0 registry.k8s.io/sig-storage/csi-attacher:v3.4.0 diff --git a/deploy/examples/operator-openshift.yaml b/deploy/examples/operator-openshift.yaml index b4175e4aa..4a2c52c90 100644 --- a/deploy/examples/operator-openshift.yaml +++ b/deploy/examples/operator-openshift.yaml @@ -177,7 +177,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.6.2" + # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.7.0" # ROOK_CSI_REGISTRAR_IMAGE: "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1" # ROOK_CSI_RESIZER_IMAGE: "registry.k8s.io/sig-storage/csi-resizer:v1.4.0" # ROOK_CSI_PROVISIONER_IMAGE: "registry.k8s.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 29979eb56..ae0074816 100644 --- a/pkg/operator/ceph/csi/spec.go +++ b/pkg/operator/ceph/csi/spec.go @@ -125,7 +125,7 @@ var ( // manually challenging. var ( // image names - DefaultCSIPluginImage = "quay.io/cephcsi/cephcsi:v3.6.2" + DefaultCSIPluginImage = "quay.io/cephcsi/cephcsi:v3.7.0" DefaultNFSPluginImage = "registry.k8s.io/sig-storage/nfsplugin:v4.0.0" DefaultRegistrarImage = "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.1" DefaultProvisionerImage = "registry.k8s.io/sig-storage/csi-provisioner:v3.1.0" diff --git a/pkg/operator/ceph/csi/version.go b/pkg/operator/ceph/csi/version.go index 5c27fbf5f..7546c1556 100644 --- a/pkg/operator/ceph/csi/version.go +++ b/pkg/operator/ceph/csi/version.go @@ -25,16 +25,14 @@ import ( ) var ( - //minimum supported version is 3.5.0 - minimum = CephCSIVersion{3, 5, 0} + //minimum supported version is 3.7.0 + minimum = CephCSIVersion{3, 7, 0} //supportedCSIVersions are versions that rook supports - releasev350 = CephCSIVersion{3, 5, 0} - releasev360 = CephCSIVersion{3, 6, 0} + releasev370 = CephCSIVersion{3, 7, 0} supportedCSIVersions = []CephCSIVersion{ minimum, - releasev350, - releasev360, + releasev370, } // custom ceph.conf is supported in v3.5.0+ diff --git a/pkg/operator/ceph/csi/version_test.go b/pkg/operator/ceph/csi/version_test.go index 9b0ed3a1f..b155829d8 100644 --- a/pkg/operator/ceph/csi/version_test.go +++ b/pkg/operator/ceph/csi/version_test.go @@ -23,11 +23,12 @@ import ( ) var ( - testMinVersion = CephCSIVersion{3, 5, 0} - testReleaseV340 = CephCSIVersion{3, 4, 0} + testMinVersion = CephCSIVersion{3, 7, 0} testReleaseV350 = CephCSIVersion{3, 5, 0} testReleaseV360 = CephCSIVersion{3, 6, 0} testReleaseV361 = CephCSIVersion{3, 6, 1} + testReleaseV370 = CephCSIVersion{3, 7, 0} + testReleaseV371 = CephCSIVersion{3, 7, 1} testVersionUnsupported = CephCSIVersion{4, 0, 0} ) @@ -41,15 +42,17 @@ func TestIsAtLeast(t *testing.T) { ret = testMinVersion.isAtLeast(&testMinVersion) 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) + // Test for 3.7.0 + ret = testReleaseV370.isAtLeast(&testReleaseV360) + assert.Equal(t, true, ret) + + // Test for 3.7.1 + ret = testReleaseV371.isAtLeast(&testReleaseV360) + assert.Equal(t, true, ret) } func TestSupported(t *testing.T) { @@ -60,13 +63,13 @@ func TestSupported(t *testing.T) { ret = testVersionUnsupported.Supported() assert.Equal(t, false, ret) - ret = testReleaseV340.Supported() + ret = testReleaseV360.Supported() assert.Equal(t, false, ret) - ret = testReleaseV350.Supported() + ret = testReleaseV370.Supported() assert.Equal(t, true, ret) - ret = testReleaseV360.Supported() + ret = testReleaseV371.Supported() assert.Equal(t, true, ret) } @@ -104,13 +107,13 @@ func TestSupportsCustomCephConf(t *testing.T) { ret = testMinVersion.SupportsCustomCephConf() assert.True(t, ret) - ret = testReleaseV340.SupportsCustomCephConf() - assert.False(t, ret) - - ret = testReleaseV350.SupportsCustomCephConf() + ret = testReleaseV360.SupportsCustomCephConf() assert.True(t, ret) - ret = testReleaseV360.SupportsCustomCephConf() + ret = testReleaseV370.SupportsCustomCephConf() + assert.True(t, ret) + + ret = testReleaseV371.SupportsCustomCephConf() assert.True(t, ret) } @@ -123,7 +126,7 @@ func TestSupportsNsenter(t *testing.T) { t.Run("AllowUnsupported=false and version 3.5 is too old", func(t *testing.T) { AllowUnsupported = false - ret := testMinVersion.SupportsNsenter() + ret := testReleaseV350.SupportsNsenter() assert.False(t, ret) })