diff --git a/Documentation/Helm-Charts/operator-chart.md b/Documentation/Helm-Charts/operator-chart.md index 8e190a2cb..c8905f381 100644 --- a/Documentation/Helm-Charts/operator-chart.md +++ b/Documentation/Helm-Charts/operator-chart.md @@ -59,7 +59,7 @@ The following table lists the configurable parameters of the rook-operator chart | `csi.cephFSKernelMountOptions` | Set CephFS Kernel mount options to use https://docs.ceph.com/en/latest/man/8/mount.ceph/#options. Set to "ms_mode=secure" when connections.encrypted is enabled in CephCluster CR | `nil` | | `csi.cephFSPluginUpdateStrategy` | CSI CephFS plugin daemonset update strategy, supported values are OnDelete and RollingUpdate | `RollingUpdate` | | `csi.cephFSPluginUpdateStrategyMaxUnavailable` | A maxUnavailable parameter of CSI cephFS plugin daemonset update strategy. | `1` | -| `csi.cephcsi.image` | Ceph CSI image | `quay.io/cephcsi/cephcsi:v3.10.2` | +| `csi.cephcsi.image` | Ceph CSI image | `quay.io/cephcsi/cephcsi:v3.11.0` | | `csi.cephfsLivenessMetricsPort` | CSI CephFS driver metrics port | `9081` | | `csi.cephfsPodLabels` | Labels to add to the CSI CephFS Deployments and DaemonSets Pods | `nil` | | `csi.clusterName` | Cluster name identifier to set as metadata on the CephFS subvolume and RBD images. This will be useful in cases like for example, when two container orchestrator clusters (Kubernetes/OCP) are using a single ceph cluster | `nil` | diff --git a/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md b/Documentation/Storage-Configuration/Ceph-CSI/custom-images.md index b63ddb073..834728149 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.10.2" +ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.11.0" ROOK_CSI_REGISTRAR_IMAGE: "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0" ROOK_CSI_PROVISIONER_IMAGE: "registry.k8s.io/sig-storage/csi-provisioner:v4.0.0" ROOK_CSI_ATTACHER_IMAGE: "registry.k8s.io/sig-storage/csi-attacher:v4.5.0" @@ -32,7 +32,7 @@ ROOK_CSIADDONS_IMAGE: "quay.io/csiaddons/k8s-sidecar:v0.8.0" If image version is not passed along with the image name in any of the variables above, Rook will add the corresponding default version to that image. Example: if `ROOK_CSI_CEPH_IMAGE: "quay.io/private-repo/cephcsi"` is passed, -Rook will add internal default version and consume it as `"quay.io/private-repo/cephcsi:v3.10.2"`. +Rook will add internal default version and consume it as `"quay.io/private-repo/cephcsi:v3.11.0"`. ### **Use default images** diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml index abbfba44a..a0decbd12 100644 --- a/deploy/charts/rook-ceph/values.yaml +++ b/deploy/charts/rook-ceph/values.yaml @@ -479,7 +479,7 @@ csi: cephcsi: # -- Ceph CSI image - # @default -- `quay.io/cephcsi/cephcsi:v3.10.2` + # @default -- `quay.io/cephcsi/cephcsi:v3.11.0` image: registrar: diff --git a/deploy/examples/images.txt b/deploy/examples/images.txt index 4d4ae0f49..a576d55ca 100644 --- a/deploy/examples/images.txt +++ b/deploy/examples/images.txt @@ -1,7 +1,7 @@ gcr.io/k8s-staging-sig-storage/objectstorage-sidecar/objectstorage-sidecar:v20230130-v0.1.0-24-gc0cf995 quay.io/ceph/ceph:v18.2.2 quay.io/ceph/cosi:v0.1.1 - quay.io/cephcsi/cephcsi:v3.10.2 + quay.io/cephcsi/cephcsi:v3.11.0 quay.io/csiaddons/k8s-sidecar:v0.8.0 registry.k8s.io/sig-storage/csi-attacher:v4.5.0 registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0 diff --git a/deploy/examples/operator-openshift.yaml b/deploy/examples/operator-openshift.yaml index 6030fb5a4..eb53859a9 100644 --- a/deploy/examples/operator-openshift.yaml +++ b/deploy/examples/operator-openshift.yaml @@ -197,7 +197,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.10.2" + # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.11.0" # ROOK_CSI_REGISTRAR_IMAGE: "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0" # ROOK_CSI_RESIZER_IMAGE: "registry.k8s.io/sig-storage/csi-resizer:v1.10.0" # ROOK_CSI_PROVISIONER_IMAGE: "registry.k8s.io/sig-storage/csi-provisioner:v4.0.0" diff --git a/deploy/examples/operator.yaml b/deploy/examples/operator.yaml index 9a0d35cf8..84a2fcf1a 100644 --- a/deploy/examples/operator.yaml +++ b/deploy/examples/operator.yaml @@ -122,7 +122,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.10.2" + # ROOK_CSI_CEPH_IMAGE: "quay.io/cephcsi/cephcsi:v3.11.0" # ROOK_CSI_REGISTRAR_IMAGE: "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0" # ROOK_CSI_RESIZER_IMAGE: "registry.k8s.io/sig-storage/csi-resizer:v1.10.0" # ROOK_CSI_PROVISIONER_IMAGE: "registry.k8s.io/sig-storage/csi-provisioner:v4.0.0" diff --git a/pkg/operator/ceph/csi/spec.go b/pkg/operator/ceph/csi/spec.go index 1a8c5bba8..0a93c166e 100644 --- a/pkg/operator/ceph/csi/spec.go +++ b/pkg/operator/ceph/csi/spec.go @@ -139,7 +139,7 @@ var ( // manually challenging. var ( // image names - DefaultCSIPluginImage = "quay.io/cephcsi/cephcsi:v3.10.2" + DefaultCSIPluginImage = "quay.io/cephcsi/cephcsi:v3.11.0" DefaultRegistrarImage = "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0" DefaultProvisionerImage = "registry.k8s.io/sig-storage/csi-provisioner:v4.0.0" DefaultAttacherImage = "registry.k8s.io/sig-storage/csi-attacher:v4.5.0" diff --git a/pkg/operator/ceph/csi/util_test.go b/pkg/operator/ceph/csi/util_test.go index 1ee73d58c..190524684 100644 --- a/pkg/operator/ceph/csi/util_test.go +++ b/pkg/operator/ceph/csi/util_test.go @@ -45,7 +45,7 @@ func TestDeploymentTemplate(t *testing.T) { } func TestGetPortFromConfig(t *testing.T) { - var key = "TEST_CSI_PORT_ENV" + key := "TEST_CSI_PORT_ENV" var defaultPort uint16 = 8000 data := map[string]string{} @@ -156,7 +156,8 @@ func Test_applyVolumeToPodSpec(t *testing.T) { assert.Len(t, ds.Spec.Template.Spec.Volumes, defaultVolumes+2) // override existing volume configuration volumes[1].VolumeSource = corev1.VolumeSource{ - HostPath: &corev1.HostPathVolumeSource{Path: "/run/test/run"}} + HostPath: &corev1.HostPathVolumeSource{Path: "/run/test/run"}, + } volumeRaw, err = yaml.Marshal(volumes) assert.Nil(t, err) config[configKey] = string(volumeRaw) @@ -178,7 +179,6 @@ func Test_applyVolumeToPodSpec(t *testing.T) { assert.Nil(t, err) applyVolumeToPodSpec(config, configKey, &ds.Spec.Template.Spec) assert.Len(t, ds.Spec.Template.Spec.Volumes, defaultVolumes+1) - } func Test_applyVolumeMountToContainer(t *testing.T) { @@ -248,7 +248,6 @@ func Test_applyVolumeMountToContainer(t *testing.T) { assert.Nil(t, err) applyVolumeMountToContainer(config, configKey, rbdContainerName, &ds.Spec.Template.Spec) assert.Len(t, ds.Spec.Template.Spec.Containers[1].VolumeMounts, defaultVolumes+1) - } func Test_getImage(t *testing.T) { @@ -267,7 +266,7 @@ func Test_getImage(t *testing.T) { args: args{ data: map[string]string{}, settingName: "ROOK_CSI_CEPH_IMAGE", - defaultImage: "quay.io/cephcsi/cephcsi:v3.10.2", + defaultImage: "quay.io/cephcsi/cephcsi:v3.11.0", }, want: DefaultCSIPluginImage, }, @@ -278,7 +277,7 @@ func Test_getImage(t *testing.T) { "ROOK_CSI_CEPH_IMAGE": "registry.io/private/cephcsi:v8", }, settingName: "ROOK_CSI_CEPH_IMAGE", - defaultImage: "quay.io/cephcsi/cephcsi:v3.10.2", + defaultImage: "quay.io/cephcsi/cephcsi:v3.11.0", }, want: "registry.io/private/cephcsi:v8", }, @@ -289,9 +288,9 @@ func Test_getImage(t *testing.T) { "ROOK_CSI_CEPH_IMAGE": "registry.io/private/cephcsi", }, settingName: "ROOK_CSI_CEPH_IMAGE", - defaultImage: "quay.io/cephcsi/cephcsi:v3.10.2", + defaultImage: "quay.io/cephcsi/cephcsi:v3.11.0", }, - want: "registry.io/private/cephcsi:v3.10.2", + want: "registry.io/private/cephcsi:v3.11.0", }, } for _, tt := range tests { diff --git a/pkg/operator/ceph/csi/version.go b/pkg/operator/ceph/csi/version.go index 01b10f5bb..a3447f4bf 100644 --- a/pkg/operator/ceph/csi/version.go +++ b/pkg/operator/ceph/csi/version.go @@ -25,14 +25,14 @@ import ( ) var ( - //minimum supported version is 3.9.0 - minimum = CephCSIVersion{3, 9, 0} + //minimum supported version is 3.10.0 + minimum = CephCSIVersion{3, 10, 0} //supportedCSIVersions are versions that rook supports - releasev310 = CephCSIVersion{3, 10, 0} + releasev311 = CephCSIVersion{3, 11, 0} supportedCSIVersions = []CephCSIVersion{ minimum, - releasev310, + releasev311, } // for parsing the output of `cephcsi` diff --git a/pkg/operator/ceph/csi/version_test.go b/pkg/operator/ceph/csi/version_test.go index 8877104fc..9ccb79d4b 100644 --- a/pkg/operator/ceph/csi/version_test.go +++ b/pkg/operator/ceph/csi/version_test.go @@ -23,14 +23,13 @@ import ( ) var ( - testMinVersion = CephCSIVersion{3, 9, 0} - testReleaseV380 = CephCSIVersion{3, 8, 0} - testReleaseV381 = CephCSIVersion{3, 8, 1} + testMinVersion = CephCSIVersion{3, 10, 0} testReleaseV390 = CephCSIVersion{3, 9, 0} testReleaseV391 = CephCSIVersion{3, 9, 1} testreleasev310 = CephCSIVersion{3, 10, 0} testReleaseV3101 = CephCSIVersion{3, 10, 1} testReleaseV3102 = CephCSIVersion{3, 10, 2} + testReleaseV3110 = CephCSIVersion{3, 11, 0} testVersionUnsupported = CephCSIVersion{4, 0, 0} ) @@ -45,12 +44,12 @@ func TestIsAtLeast(t *testing.T) { ret = testMinVersion.isAtLeast(&testMinVersion) assert.Equal(t, true, ret) - // Test for 3.8.0 - ret = testReleaseV380.isAtLeast(&testMinVersion) + // Test for 3.9.0 + ret = testReleaseV390.isAtLeast(&testMinVersion) assert.Equal(t, false, ret) - // Test for 3.8.1 - ret = testReleaseV381.isAtLeast(&testMinVersion) + // Test for 3.9.1 + ret = testReleaseV391.isAtLeast(&testMinVersion) assert.Equal(t, false, ret) // Test for 3.10.0 @@ -65,6 +64,10 @@ func TestIsAtLeast(t *testing.T) { ret = testReleaseV3102.isAtLeast(&testReleaseV3102) assert.Equal(t, true, ret) + // Test for 3.11.0 + ret = testReleaseV3110.isAtLeast(&testReleaseV3110) + assert.Equal(t, true, ret) + } func TestSupported(t *testing.T) { @@ -75,24 +78,21 @@ func TestSupported(t *testing.T) { ret = testVersionUnsupported.Supported() assert.Equal(t, false, ret) - // 3.8.x is not supported after 3.10.0 release - ret = testReleaseV380.Supported() - assert.Equal(t, false, ret) - - ret = testReleaseV381.Supported() - assert.Equal(t, false, ret) - + // 3.9.x is not supported after 3.11.0 release ret = testReleaseV390.Supported() - assert.Equal(t, true, ret) + assert.Equal(t, false, ret) ret = testReleaseV391.Supported() - assert.Equal(t, true, ret) + assert.Equal(t, false, ret) ret = testreleasev310.Supported() assert.Equal(t, true, ret) ret = testReleaseV3101.Supported() assert.Equal(t, true, ret) + + ret = testReleaseV3110.Supported() + assert.Equal(t, true, ret) } func Test_extractCephCSIVersion(t *testing.T) {