From 1d66658802e83aca2e0fda3b51b5a4386f3c9d83 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Wed, 14 Apr 2021 18:21:01 -0600 Subject: [PATCH] link to embedded ObjectMeta discussion Signed-off-by: Blaine Gardner --- pkg/crd/gen.go | 2 -- pkg/crd/known_types.go | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/crd/gen.go b/pkg/crd/gen.go index 0a0e1669a..dd154c549 100644 --- a/pkg/crd/gen.go +++ b/pkg/crd/gen.go @@ -286,9 +286,7 @@ func FixTopLevelMetadata(crd apiext.CustomResourceDefinition) { schemaProperties["metadata"] = apiext.JSONSchemaProps{Type: "object"} } } - } - } // toTrivialVersions strips out all schemata except for the storage schema, diff --git a/pkg/crd/known_types.go b/pkg/crd/known_types.go index 235892dd2..b5c7df1f3 100644 --- a/pkg/crd/known_types.go +++ b/pkg/crd/known_types.go @@ -118,7 +118,8 @@ var ObjectMetaPackages = map[string]PackageOverride{ if f, ok := KnownPackages["k8s.io/apimachinery/pkg/apis/meta/v1"]; ok { f(p, pkg) } - // This is a allow-listed set of properties of ObjectMeta, other runtime properties are not part of this list + // This is an allow-listed set of properties of ObjectMeta, other runtime properties are not part of this list + // See more discussion: https://github.com/kubernetes-sigs/controller-tools/pull/395#issuecomment-691919433 p.Schemata[TypeIdent{Name: "ObjectMeta", Package: pkg}] = apiext.JSONSchemaProps{ Type: "object", Properties: map[string]apiext.JSONSchemaProps{