-
-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
derive(CELSchema)
macro for generating cel validation on …
…CRDs (#1649) * Implement cel validation proc macro for generated CRDs - Extend with supported values from docs - https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules - Implement as Validated derive macro - Use the raw Rule for the validated attribute Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Add cel_validate proc macro for completion, rename Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Add builder for the Rule Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Fmt fixes Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Implement as a JsonSchema generator via derive(ValidateSchema) Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Allow to pass rules to the CRD struct Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Add derive tests and doc support Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * fmt fixes Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Rename to CELSchema, simplify derive addition in kube macro Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Move to a separate package Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * clippy/fmt fixes Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Add doc comments to lib.rs Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Make attribute removal another fn Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Doc comment from suggestion Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Clippy nightly fixes Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> --------- Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
- Loading branch information
1 parent
0424cb4
commit b104472
Showing
10 changed files
with
740 additions
and
42 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
Oops, something went wrong.