-
Notifications
You must be signed in to change notification settings - Fork 220
Extend the readiness evaluation of dependencies with CEL expressions #1491
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
Conversation
Extend the readiness evaluation of dependencies with CEL expressions Signed-off-by: Stefan Prodan <[email protected]>
Signed-off-by: Stefan Prodan <[email protected]>
ab86de4 to
f43f146
Compare
| // ReadyExpr is a CEL expression that can be used to assess the readiness | ||
| // of a dependency. When specified, the built-in readiness check | ||
| // is replaced by the logic defined in the CEL expression. | ||
| // To make the CEL expression additive to the built-in readiness check, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: The word additive here all by itself can sound a bit vague. Since here is a space where we don't have to spare words (like in the case of choosing a name for a feature gate), we can probably be a bit more verbose/redundant here and say that "the hard-coded logic and the CEL expression are AND'ed together".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the hard-coded logic and the CEL expression are AND'ed together
This sounds wrong to me, it's not hard-coded but bulit-in, the AND'ed is no better than additive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, hard-coded vs built-in sounds the same to me, but I'd say AND'ed is pretty clear and additive not so much
82eb791 to
5486009
Compare
matheuscscp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
5486009 to
6359abe
Compare
Signed-off-by: Stefan Prodan <[email protected]>
Signed-off-by: Stefan Prodan <[email protected]>
6359abe to
d17e5d2
Compare
Signed-off-by: Stefan Prodan <[email protected]>
This PR extends the Kustomization API with the
.spec.dependsOn[].readyExproptional field that can be used to define a CEL expression to determine the readiness of a Kustomization dependency.This is helpful for when custom logic is needed to determine if a dependency is ready. For example, when performing a lockstep upgrade, the
readyExprcan be used to verify that a dependency has a matching version label before proceeding with the reconciliation of the dependent Kustomization.The CEL expression contains the following variables:
dep: The dependency Kustomization object being evaluated.self: The Kustomization object being reconciled.Note: When
readyExpris specified, the built-in readiness check is replaced by the logic defined in the CEL expression. You can configure the controller to run both the CEL expression evaluation and the built-in readiness check, with theAdditiveCELDependencyCheckfeature gate.Closes: #1490