Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote VolumeAttributesClass to Beta #1253

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
},
Expand Down Expand Up @@ -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,
},
Expand Down Expand Up @@ -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,
},
Expand All @@ -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,
},
Expand Down
3 changes: 2 additions & 1 deletion pkg/features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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},
}