Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CEL client side validation #1670

Open
clux opened this issue Dec 22, 2024 · 0 comments
Open

CEL client side validation #1670

clux opened this issue Dec 22, 2024 · 0 comments
Labels
cel common expression language related help wanted Not immediately prioritised, please help!

Comments

@clux
Copy link
Member

clux commented Dec 22, 2024

What problem are you trying to solve?

I want to verify that a local object satisfies a CEL validation rule as specified via Rule or #[cel_validation] attributes (via #1649 ) without having to kubectl apply / Api::patch the object and wait for apiserver validation to pass/fail.

Describe the solution you'd like

An optional feature dependency kube-core/cel and maybe kube-derive/cel (enabled via kube/cel) which adds a dependency on (e.g.) cel-interpreter to run client-side CEL evaluation against local objects.

AFAIKT, we can encode our objects as a cel Context and run the x-kubernetes-validations.rule against it. Their Value type seems to be convertible into from a serde::Serialize impl.

Describe alternatives you've considered

None, open to alternatives.

Documentation, Adoption, Migration Strategy

Addition under feature for CELSchema users. Needs documentation as with the rest of cel.

Target crate for feature

kube-core, kube-derive

@clux clux added cel common expression language related help wanted Not immediately prioritised, please help! labels Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cel common expression language related help wanted Not immediately prioritised, please help!
Projects
None yet
Development

No branches or pull requests

1 participant