From 17095ae8df26d9b0bbd29c8d5db031e8b12e1f33 Mon Sep 17 00:00:00 2001 From: Drew Sirenko <68304519+AndrewSirenko@users.noreply.github.com> Date: Sat, 10 Aug 2024 14:29:29 -0400 Subject: [PATCH 1/2] Promote VolumeAttributesClass to Beta --- README.md | 1 + pkg/features/features.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d58d4e9d5..c94613aeb5 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Following table reflects the head of this branch. | CSINodeExpandSecret | GA | On | [CSI Node expansion secret](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/3107-csi-nodeexpandsecret) | No | | HonorPVReclaimPolicy| Beta | On | [Honor the PV reclaim policy](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/2644-honor-pv-reclaim-policy) | No | | PreventVolumeModeConversion | Beta |On | [Prevent unauthorized conversion of source volume mode](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/3141-prevent-volume-mode-conversion) | `--prevent-volume-mode-conversion` (No in-tree feature gate) | +| VolumeAttributesClass | Beta | Off | [Pass VolumeAttributesClass parameters during CreateVolume](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/3751-volume-attributes-class/README.md) | `--feature-gates=VolumeAttributesClass=true` | | CrossNamespaceVolumeDataSource | Alpha |Off | [Cross-namespace volume data source](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/3294-provision-volumes-from-cross-namespace-snapshots) | `--feature-gates=CrossNamespaceVolumeDataSource=true` | All other external-provisioner features and the external-provisioner itself is considered GA and fully supported. diff --git a/pkg/features/features.go b/pkg/features/features.go index a90f0e1ca7..0ec9216554 100644 --- a/pkg/features/features.go +++ b/pkg/features/features.go @@ -46,6 +46,7 @@ const ( // owner: @sunnylovestiramisu @ConnorJC3 // kep: https://kep.k8s.io/3751 // alpha: v1.29 + // beta: v1.31 // // Pass VolumeAttributesClass parameters to supporting CSI drivers during CreateVolume VolumeAttributesClass featuregate.Feature = "VolumeAttributesClass" @@ -61,5 +62,5 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS Topology: {Default: true, PreRelease: featuregate.GA}, HonorPVReclaimPolicy: {Default: true, PreRelease: featuregate.Beta}, CrossNamespaceVolumeDataSource: {Default: false, PreRelease: featuregate.Alpha}, - VolumeAttributesClass: {Default: false, PreRelease: featuregate.Alpha}, + VolumeAttributesClass: {Default: false, PreRelease: featuregate.Beta}, } From 1c1c4a6095e3f15e6ba7233108668fbd83e80d03 Mon Sep 17 00:00:00 2001 From: Drew Sirenko <68304519+AndrewSirenko@users.noreply.github.com> Date: Thu, 15 Aug 2024 21:57:27 -0400 Subject: [PATCH 2/2] Bump VAC objects to v1beta1 --- pkg/controller/controller.go | 2 +- pkg/controller/controller_test.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 1ce19ad680..a9d84464a0 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -757,7 +757,7 @@ func (p *csiProvisioner) prepareProvision(ctx context.Context, claim *v1.Persist } if vacName != "" { - vac, err := p.client.StorageV1alpha1().VolumeAttributesClasses().Get(ctx, vacName, metav1.GetOptions{}) + vac, err := p.client.StorageV1beta1().VolumeAttributesClasses().Get(ctx, vacName, metav1.GetOptions{}) if err != nil { return nil, controller.ProvisioningNoChange, err } diff --git a/pkg/controller/controller_test.go b/pkg/controller/controller_test.go index 43089f6435..8dc5931dc4 100644 --- a/pkg/controller/controller_test.go +++ b/pkg/controller/controller_test.go @@ -33,7 +33,7 @@ import ( "google.golang.org/grpc/status" v1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" - storagev1alpha1 "k8s.io/api/storage/v1alpha1" + storagev1beta1 "k8s.io/api/storage/v1beta1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -2326,7 +2326,7 @@ func provisionTestcases() (int64, map[string]provisioningTestcase) { features.VolumeAttributesClass: true, }, pluginCapabilities: provisionWithVACCapabilities, - clientSetObjects: []runtime.Object{&storagev1alpha1.VolumeAttributesClass{ + clientSetObjects: []runtime.Object{&storagev1beta1.VolumeAttributesClass{ ObjectMeta: metav1.ObjectMeta{ Name: vacName, }, @@ -2379,7 +2379,7 @@ func provisionTestcases() (int64, map[string]provisioningTestcase) { features.VolumeAttributesClass: false, }, pluginCapabilities: provisionWithVACCapabilities, - clientSetObjects: []runtime.Object{&storagev1alpha1.VolumeAttributesClass{ + clientSetObjects: []runtime.Object{&storagev1beta1.VolumeAttributesClass{ ObjectMeta: metav1.ObjectMeta{ Name: vacName, }, @@ -2448,7 +2448,7 @@ func provisionTestcases() (int64, map[string]provisioningTestcase) { features.VolumeAttributesClass: true, }, pluginCapabilities: provisionWithVACCapabilities, - clientSetObjects: []runtime.Object{&storagev1alpha1.VolumeAttributesClass{ + clientSetObjects: []runtime.Object{&storagev1beta1.VolumeAttributesClass{ ObjectMeta: metav1.ObjectMeta{ Name: vacName, }, @@ -2475,7 +2475,7 @@ func provisionTestcases() (int64, map[string]provisioningTestcase) { features.VolumeAttributesClass: true, }, pluginCapabilities: provisionWithVACCapabilities, - clientSetObjects: []runtime.Object{&storagev1alpha1.VolumeAttributesClass{ + clientSetObjects: []runtime.Object{&storagev1beta1.VolumeAttributesClass{ ObjectMeta: metav1.ObjectMeta{ Name: vacName, },