-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The issue kubernetes-sigs/controller-tools#342 was fixed and CRD generator now supports validation markers for array items. This change uses items markers and removes hack used to add max length and pattern constraints to hosts. Signed-off-by: Alexander Yastrebov <[email protected]>
- Loading branch information
1 parent
ef1803d
commit 0c7bd04
Showing
4 changed files
with
7 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,10 +31,7 @@ $(GENERATED): $(CRD_TYPE_SOURCE) | |
bash -x ./hack/update-codegen.sh | ||
|
||
$(GENERATED_CRD): go.mod $(GENERATED) | ||
go run sigs.k8s.io/controller-tools/cmd/[email protected] crd:crdVersions=v1 paths=./apis/... output:crd:dir=. | ||
# workaround to add validation to array items. Not supported by controller-gen | ||
# ref: https://github.com/kubernetes-sigs/controller-tools/issues/342 | ||
go run hack/crd/add_hosts_validation.go $(GENERATED_CRD) | ||
go run sigs.k8s.io/controller-tools/cmd/[email protected] crd:crdVersions=v1 paths=./apis/... output:crd:dir=. | ||
|
||
build.local: $(LOCAL_BINARIES) $(GENERATED_CRD) | ||
build.linux: $(LINUX_BINARIES) $(GENERATED_CRD) | ||
|
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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