Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate CRD based via controller-gen #2355

Closed
youngbupark opened this issue Oct 29, 2020 · 2 comments
Closed

Generate CRD based via controller-gen #2355

youngbupark opened this issue Oct 29, 2020 · 2 comments

Comments

@youngbupark
Copy link

youngbupark commented Oct 29, 2020

In what area(s)?

/area runtime

Describe the feature

The current code-generate makefile target does not generate crd so that all markers in types.go are not applied to the actual crd.

adding the options to code-generate, it will generate crd based on markers in types.go under https://github.com/dapr/dapr/tree/master/pkg/apis

then we need to add crd output option output:crd:artifacts:config=config/crd/bases

dapr/tools/codegen.mk

Lines 8 to 10 in 28a1536

code-generate: controller-gen
$(CONTROLLER_GEN) object:headerFile="./tools/boilerplate.go.txt" \
paths="./pkg/apis/..."

e.g.

code-generate: controller-gen
	$(CONTROLLER_GEN) object:headerFile="./tools/boilerplate.go.txt" \
		crd:trivialVersions=true paths="./pkg/apis/..." output:crd:artifacts:config=config/crd/bases

Release Note

RELEASE NOTE: ADD the option to generate crd via controller-gen

@youngbupark
Copy link
Author

@yaron2 markers in types.go are not applied to our crd yaml. to use the markers, we need to generate crds via controller.gen as well, not a manual way.

@youngbupark youngbupark added the P1 label Oct 29, 2020
@mukundansundar mukundansundar added this to To do in 1.0.0 Milestone 1 via automation Oct 30, 2020
@mukundansundar mukundansundar added this to To do in 1.0.0 Milestone via automation Oct 30, 2020
@mukundansundar mukundansundar moved this from To do to In progress in 1.0.0 Milestone 1 Oct 30, 2020
@mukundansundar mukundansundar moved this from To do to In progress in 1.0.0 Milestone Oct 30, 2020
@mukundansundar mukundansundar added breaking-change This is a breaking change and removed breaking-change This is a breaking change labels Oct 30, 2020
1.0.0 Milestone 1 automation moved this from In progress to Review Oct 30, 2020
1.0.0 Milestone automation moved this from In progress to Done Oct 30, 2020
@mukundansundar
Copy link
Contributor

Fixed with #2356

@artursouza artursouza moved this from Review to Done in 1.0.0 Milestone 1 Nov 4, 2020
@artursouza artursouza moved this from Done to Release in 1.0.0 Milestone 1 Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

3 participants