From 4861b9e3dfddc9a6057ca70f36b6b882e48a8c6c Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Thu, 17 Mar 2022 21:31:54 +0000 Subject: [PATCH] review comments Kubernetes-commit: 17e74b3936c341d2b6eed55570c0ffaabd52d3ad --- pkg/registry/rest/create.go | 1 + pkg/registry/rest/update.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/registry/rest/create.go b/pkg/registry/rest/create.go index 32ca642cf..83d5e576a 100644 --- a/pkg/registry/rest/create.go +++ b/pkg/registry/rest/create.go @@ -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 { diff --git a/pkg/registry/rest/update.go b/pkg/registry/rest/update.go index 7c8ec3e2e..e5ae7af0e 100644 --- a/pkg/registry/rest/update.go +++ b/pkg/registry/rest/update.go @@ -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 {