internal/pkg/scaffold/crd.go: overwrite CRD manifests for Go operators#1278
Merged
estroz merged 16 commits intooperator-framework:masterfrom May 2, 2019
Merged
internal/pkg/scaffold/crd.go: overwrite CRD manifests for Go operators#1278estroz merged 16 commits intooperator-framework:masterfrom
estroz merged 16 commits intooperator-framework:masterfrom
Conversation
estroz
commented
Apr 2, 2019
added 4 commits
April 5, 2019 10:17
Contributor
|
Also related #1323 |
added 3 commits
April 15, 2019 16:56
override PROJECT file check by the CRD generator Gopkg.toml: add controller-tools override (temporary)
aaf0cee to
6dc5d8b
Compare
|
New changes are detected. LGTM label has been removed. |
estroz
commented
Apr 16, 2019
| IsOperatorGo bool | ||
|
|
||
| once sync.Once | ||
| fs afero.Fs // For testing, ex. afero.NewMemMapFs() |
Member
Author
There was a problem hiding this comment.
I'm repeating this pattern from CSV generation for easier testing. In the future this should be refactored into Input so all scaffolds can access a test afero.Fs.
Member
Author
Contributor
|
Worth mentioning this in the CHANGELOG to warn users expecting to preserve manual edits to the CRD manifest. |
estroz
pushed a commit
to estroz/operator-sdk
that referenced
this pull request
May 2, 2019
operator-framework#1278) * internal/pkg/scaffold: overwrite CRD's with newly generated ones unless operator is non-go * internal/pkg/scaffold/crd.go: set names if not empty, and set Repo to override PROJECT file check by the CRD generator * Gopkg.toml: add controller-tools override (temporary) * revendor * CHANGELOG.md: added kubebuilder annotation bug and change entries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change: overwrite on-disk CRD manifests for Go operators.
Motivation for the change:
controller-toolsCRD generator is used for Go operators. This generator supports most OpenAPIv3 validation properties, and other nice-to-have automation, through Go code annotations. Annotations for all validation properties is a WIP. Generating CRD manifests using these annotations is more reproducible and robust than preserving data in on-disk CRD manifests, so they should be overwritten every time a command that scaffolds a CRD manifest is invoked.Closes #1212, closes #1323