Skip to content

Commit

Permalink
refact(crds): refactor generate cstor crds based on openAPIV3 validat…
Browse files Browse the repository at this point in the history
…ion (#59)

* feat(crds): generate cstor crds based on openAPIV3 validation
- add custom columns
- add omitempty JSON tags following the APIs practices
- add nullable tags in array and time data types to accept
  them as a null value
Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
  • Loading branch information
prateekpandey14 authored Jul 29, 2020
1 parent 2177d79 commit 4b0764a
Show file tree
Hide file tree
Showing 15 changed files with 501 additions and 366 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ generate: generate-crds

generate-crds: controller-gen
# Generate manifests e.g. CRD, RBAC etc.
$(CONTROLLER_GEN) crd paths="./pkg/apis/cstor" output:crd:artifacts:config=config/crds/bases
$(CONTROLLER_GEN) crd:trivialVersions=true,preserveUnknownFields=false paths="./pkg/apis/cstor/..." output:crd:artifacts:config=config/crds/bases
# merge all crds into a single file
rm $(ALL_CRDS)
cat config/crds/bases/*.yaml >> $(ALL_CRDS)

.PHONY: kubegen
Expand Down
Loading

0 comments on commit 4b0764a

Please sign in to comment.