diff --git a/cmd/internal/codegen/parse/crd.go b/cmd/internal/codegen/parse/crd.go index ce20636f59c..663977bc748 100644 --- a/cmd/internal/codegen/parse/crd.go +++ b/cmd/internal/codegen/parse/crd.go @@ -32,9 +32,9 @@ import ( "text/template" ) -// parseJSONSchemaProps populates the CRD field of each Group.Version.Resource, +// parseCRDs populates the CRD field of each Group.Version.Resource, // creating validations using the annotations on type fields. -func (b *APIs) parseJSONSchemaProps() { +func (b *APIs) parseCRDs() { for _, group := range b.APIs.Groups { for _, version := range group.Versions { for _, resource := range version.Resources { diff --git a/cmd/internal/codegen/parse/parser.go b/cmd/internal/codegen/parse/parser.go index abf0923a2d9..1a92fc0d9ac 100644 --- a/cmd/internal/codegen/parse/parser.go +++ b/cmd/internal/codegen/parse/parser.go @@ -22,11 +22,11 @@ import ( "github.com/kubernetes-sigs/kubebuilder/cmd/internal/codegen" "github.com/pkg/errors" rbacv1 "k8s.io/api/rbac/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/gengo/args" "k8s.io/gengo/generator" "k8s.io/gengo/types" - "k8s.io/apimachinery/pkg/apis/meta/v1" ) type APIs struct { @@ -63,7 +63,7 @@ func NewAPIs(context *generator.Context, arguments *args.GeneratorArgs) *APIs { b.parseRBAC() b.parseInformers() b.parseAPIs() - b.parseJSONSchemaProps() + b.parseCRDs() return b }