-
-
Notifications
You must be signed in to change notification settings - Fork 323
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 <[email protected]> * Add cel_validate proc macro for completion, rename Signed-off-by: Danil-Grigorev <[email protected]> * Add builder for the Rule Signed-off-by: Danil-Grigorev <[email protected]> * Fmt fixes Signed-off-by: Danil-Grigorev <[email protected]> * Implement as a JsonSchema generator via derive(ValidateSchema) Signed-off-by: Danil-Grigorev <[email protected]> * Allow to pass rules to the CRD struct Signed-off-by: Danil-Grigorev <[email protected]> * Add derive tests and doc support Signed-off-by: Danil-Grigorev <[email protected]> * fmt fixes Signed-off-by: Danil-Grigorev <[email protected]> * Rename to CELSchema, simplify derive addition in kube macro Signed-off-by: Danil-Grigorev <[email protected]> * Move to a separate package Signed-off-by: Danil-Grigorev <[email protected]> * clippy/fmt fixes Signed-off-by: Danil-Grigorev <[email protected]> * Add doc comments to lib.rs Signed-off-by: Danil-Grigorev <[email protected]> * Make attribute removal another fn Signed-off-by: Danil-Grigorev <[email protected]> * Doc comment from suggestion Signed-off-by: Danil-Grigorev <[email protected]> * Clippy nightly fixes Signed-off-by: Danil-Grigorev <[email protected]> --------- Signed-off-by: Danil-Grigorev <[email protected]>
- 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.