-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make sure crd-* manifests are YAML before passing to controller-gen
The controller-gen tool's schemapatch option silently skips CRDs files that are not valid YAML. We often forget that, and end up merging a CRD file that we silently won't be able to update using ./hack/update-crds.sh. This patch uses CUE to parse the YAML files. We could have picked something like yq (Python) or the Go version of yq, but we don't want Python dependencies, and the Go version of yq has a poor UX. Here is what you can expect when one of the CRDs isn't a proper YAML file: % ./hack/update-crds.sh /home/mvalais/code/cert-manager/deploy/crds/crd-orders.yaml:14: did not find expected key Signed-off-by: Maël Valais <mael@vls.dev>
- Loading branch information
Showing
5 changed files
with
74 additions
and
2 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
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 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 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 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// We just validate that our CRDs are valid YAML files, we don't care about | ||
// validating the data itself. |