review comments

Kubernetes-commit: 17e74b3936c341d2b6eed55570c0ffaabd52d3ad
This commit is contained in:
Daniel Smith 2022-03-17 21:31:54 +00:00 committed by Kubernetes Publisher
parent 7b0bc4f4b3
commit 4861b9e3df
2 changed files with 2 additions and 0 deletions

View File

@ -126,6 +126,7 @@ func BeforeCreate(strategy RESTCreateStrategy, ctx context.Context, obj runtime.
// ZZZ_DeprecatedClusterName is ignored and should not be saved
if len(objectMeta.GetZZZ_DeprecatedClusterName()) > 0 {
objectMeta.SetZZZ_DeprecatedClusterName("")
warning.AddWarning(ctx, "", "metadata.clusterName was specified. This field is not preserved and will be removed from the schema in 1.25")
}
if errs := strategy.Validate(ctx, obj); len(errs) > 0 {

View File

@ -139,6 +139,7 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx context.Context, obj, old run
// ZZZ_DeprecatedClusterName is ignored and should not be saved
if len(objectMeta.GetZZZ_DeprecatedClusterName()) > 0 {
objectMeta.SetZZZ_DeprecatedClusterName("")
warning.AddWarning(ctx, "", "metadata.clusterName was specified. This field is not preserved and will be removed from the schema in 1.25")
}
// Use the existing UID if none is provided
if len(objectMeta.GetUID()) == 0 {