Skip to content

Commit

Permalink
Merge pull request #311 from estroz/set-crd-names
Browse files Browse the repository at this point in the history
✨ pkg/crd/spec.go: set default ListKind and Singular CRD names
  • Loading branch information
k8s-ci-robot authored Sep 3, 2019
2 parents 538d4b2 + 8da6554 commit ba11932
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/crd/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,10 @@ func (p *Parser) NeedCRDFor(groupKind schema.GroupKind, maxDescLen *int) {
Spec: apiext.CustomResourceDefinitionSpec{
Group: groupKind.Group,
Names: apiext.CustomResourceDefinitionNames{
Kind: groupKind.Kind,
Plural: defaultPlural,
Kind: groupKind.Kind,
ListKind: groupKind.Kind + "List",
Plural: defaultPlural,
Singular: strings.ToLower(groupKind.Kind),
},
},
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/crd/testdata/testdata.kubebuilder.io_cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ spec:
group: testdata.kubebuilder.io
names:
kind: CronJob
listKind: CronJobList
plural: cronjobs
singular: cronjob
scope: Namespaced
version: v1
versions:
Expand Down

0 comments on commit ba11932

Please sign in to comment.