Skip to content

Commit

Permalink
Stop using storage.k8s.io/v1beta1 deprecated in k8s 1.22 (#814)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Nov 2, 2021
1 parent 73f09b6 commit b9f7ead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/validator/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func ValidateStorage(client kubernetes.Interface, storageType api.StorageType, s
}

if spec.StorageClassName != nil {
if _, err := client.StorageV1beta1().StorageClasses().Get(context.TODO(), *spec.StorageClassName, metav1.GetOptions{}); err != nil {
if _, err := client.StorageV1().StorageClasses().Get(context.TODO(), *spec.StorageClassName, metav1.GetOptions{}); err != nil {
if kerr.IsNotFound(err) {
return fmt.Errorf(`%v.storageClassName "%v" not found`, storagePath, *spec.StorageClassName)
}
Expand Down

0 comments on commit b9f7ead

Please sign in to comment.