deprecated node labels: make naming consistant and remove some unused args in funcs

This commit is contained in:
Paco Xu
2022-05-25 11:41:51 +08:00
parent db147b7d67
commit 234c33e8b8
9 changed files with 31 additions and 36 deletions

View File

@@ -57,7 +57,7 @@ func (csiStorageCapacityStrategy) Validate(ctx context.Context, obj runtime.Obje
// WarningsOnCreate returns warnings for the creation of the given object.
func (csiStorageCapacityStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string {
return storageutil.GetWarningsForCSIStorageCapacity(ctx, obj.(*storage.CSIStorageCapacity))
return storageutil.GetWarningsForCSIStorageCapacity(obj.(*storage.CSIStorageCapacity))
}
// Canonicalize normalizes the object after validation.
@@ -81,7 +81,7 @@ func (csiStorageCapacityStrategy) ValidateUpdate(ctx context.Context, obj, old r
// WarningsOnUpdate returns warnings for the given update.
func (csiStorageCapacityStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string {
return storageutil.GetWarningsForCSIStorageCapacity(ctx, obj.(*storage.CSIStorageCapacity))
return storageutil.GetWarningsForCSIStorageCapacity(obj.(*storage.CSIStorageCapacity))
}
func (csiStorageCapacityStrategy) AllowUnconditionalUpdate() bool {

View File

@@ -53,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 storageutil.GetWarningsForStorageClass(ctx, obj.(*storage.StorageClass))
return storageutil.GetWarningsForStorageClass(obj.(*storage.StorageClass))
}
// Canonicalize normalizes the object after validation.
@@ -75,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 storageutil.GetWarningsForStorageClass(ctx, obj.(*storage.StorageClass))
return storageutil.GetWarningsForStorageClass(obj.(*storage.StorageClass))
}
func (storageClassStrategy) AllowUnconditionalUpdate() bool {