Skip to content

Commit

Permalink
link to embedded ObjectMeta discussion
Browse files Browse the repository at this point in the history
Signed-off-by: Blaine Gardner <[email protected]>
  • Loading branch information
BlaineEXE committed Apr 20, 2021
1 parent adfbf77 commit 1d66658
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions pkg/crd/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion pkg/crd/known_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 1d66658

Please sign in to comment.