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:
Paco Xu
2022-03-07 15:40:02 +08:00
parent 6605e526b0
commit 3fbfd7eb1b
9 changed files with 173 additions and 39 deletions

View File

@@ -78,7 +78,7 @@ func (persistentvolumeStrategy) Validate(ctx context.Context, obj runtime.Object
// WarningsOnCreate returns warnings for the creation of the given object.
func (persistentvolumeStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string {
return nil
return pvutil.GetWarningsForPersistentVolume(ctx, obj.(*api.PersistentVolume))
}
// Canonicalize normalizes the object after validation.
@@ -109,7 +109,7 @@ func (persistentvolumeStrategy) ValidateUpdate(ctx context.Context, obj, old run
// WarningsOnUpdate returns warnings for the given update.
func (persistentvolumeStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string {
return nil
return pvutil.GetWarningsForPersistentVolume(ctx, obj.(*api.PersistentVolume))
}
func (persistentvolumeStrategy) AllowUnconditionalUpdate() bool {