mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
add deprecated warning for node beta labels in pv/sc/rc/csi storage capacity
- (pv) deprecated label using warning for node affinity - (storageclass) deprecated node labels: allowedTopologies.matchLabelExpressions.key - (CSIStorageCapacity) deprecated node labels - (RuntimeClass) deprecated node labels
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
"k8s.io/apiserver/pkg/storage/names"
|
||||
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
||||
storageutil2 "k8s.io/kubernetes/pkg/api/storage"
|
||||
"k8s.io/kubernetes/pkg/apis/storage"
|
||||
"k8s.io/kubernetes/pkg/apis/storage/validation"
|
||||
)
|
||||
@@ -52,7 +53,7 @@ func (storageClassStrategy) Validate(ctx context.Context, obj runtime.Object) fi
|
||||
|
||||
// WarningsOnCreate returns warnings for the creation of the given object.
|
||||
func (storageClassStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string {
|
||||
return nil
|
||||
return storageutil2.GetWarningsForStorageClass(ctx, obj.(*storage.StorageClass))
|
||||
}
|
||||
|
||||
// Canonicalize normalizes the object after validation.
|
||||
@@ -74,7 +75,7 @@ func (storageClassStrategy) ValidateUpdate(ctx context.Context, obj, old runtime
|
||||
|
||||
// WarningsOnUpdate returns warnings for the given update.
|
||||
func (storageClassStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string {
|
||||
return nil
|
||||
return storageutil2.GetWarningsForStorageClass(ctx, obj.(*storage.StorageClass))
|
||||
}
|
||||
|
||||
func (storageClassStrategy) AllowUnconditionalUpdate() bool {
|
||||
|
||||
Reference in New Issue
Block a user