-
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
Changes from all commits
5edcf5b
c2754dd
e0e6e22
d17e5d2
fd63b52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,9 @@ limitations under the License. | |
|
|
||
| package v1 | ||
|
|
||
| import "fmt" | ||
| import ( | ||
| "fmt" | ||
| ) | ||
|
|
||
| // CrossNamespaceSourceReference contains enough information to let you locate the | ||
| // typed Kubernetes resource object at cluster level. | ||
|
|
@@ -40,9 +42,31 @@ type CrossNamespaceSourceReference struct { | |
| Namespace string `json:"namespace,omitempty"` | ||
| } | ||
|
|
||
| // String returns a string representation of the CrossNamespaceSourceReference | ||
| // in the format "Kind/Name" or "Kind/Namespace/Name" if Namespace is set. | ||
| func (s *CrossNamespaceSourceReference) String() string { | ||
| if s.Namespace != "" { | ||
| return fmt.Sprintf("%s/%s/%s", s.Kind, s.Namespace, s.Name) | ||
| } | ||
| return fmt.Sprintf("%s/%s", s.Kind, s.Name) | ||
| } | ||
|
|
||
| // DependencyReference defines a Kustomization dependency on another Kustomization resource. | ||
| type DependencyReference struct { | ||
| // Name of the referent. | ||
| // +required | ||
| Name string `json:"name"` | ||
|
|
||
| // Namespace of the referent, defaults to the namespace of the Kustomization | ||
| // resource object that contains the reference. | ||
| // +optional | ||
| Namespace string `json:"namespace,omitempty"` | ||
|
|
||
| // 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, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: The word
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This sounds wrong to me, it's not hard-coded but bulit-in, the AND'ed is no better than additive.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| // the feature gate `AdditiveCELDependencyCheck` must be set to `true`. | ||
| // +optional | ||
| ReadyExpr string `json:"readyExpr,omitempty"` | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.