Skip to content

Commit

Permalink
Merge pull request #433 from mcristina422/removeStatus
Browse files Browse the repository at this point in the history
✨ Remove status from generated CRDs
  • Loading branch information
k8s-ci-robot committed Apr 28, 2020
2 parents 581f622 + b9fd300 commit 67819ee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
6 changes: 1 addition & 5 deletions pkg/crd/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,7 @@ func (p *Parser) NeedCRDFor(groupKind schema.GroupKind, maxDescLen *int) {
packages[0].AddError(fmt.Errorf("CRD for %s with version(s) %v does not serve any version", groupKind, crd.Spec.Versions))
}

// NB(directxman12): CRD's status doesn't have omitempty markers, which means things
// get serialized as null, which causes the validator to freak out. Manually set
// these to empty till we get a better solution.
crd.Status.Conditions = []apiext.CustomResourceDefinitionCondition{}
crd.Status.StoredVersions = []string{}
crd.Status = apiext.CustomResourceDefinitionStatus{}

p.CustomResourceDefinitions[groupKind] = crd
}
6 changes: 0 additions & 6 deletions pkg/crd/testdata/testdata.kubebuilder.io_cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5183,9 +5183,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

0 comments on commit 67819ee

Please sign in to comment.