Skip to content

Commit 2f763a4

Browse files
authored
Merge pull request #857 from fluxcd/custom-healthchecks
[RFC-0009] Add healthcheck expressions to kustomize types
2 parents af0f283 + a6353b2 commit 2f763a4

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

apis/kustomize/kustomize_types.go

+29
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,32 @@ type JSON6902Patch struct {
132132
// +required
133133
Target Selector `json:"target"`
134134
}
135+
136+
// CustomHealthCheck defines the health check for custom resources.
137+
type CustomHealthCheck struct {
138+
// APIVersion of the custom resource under evaluation.
139+
// +required
140+
APIVersion string `json:"apiVersion"`
141+
// Kind of the custom resource under evaluation.
142+
// +required
143+
Kind string `json:"kind"`
144+
145+
HealthCheckExpressions `json:",inline"`
146+
}
147+
148+
// HealthCheckExpressions defines the CEL expressions for determining the health status
149+
// of custom resources.
150+
type HealthCheckExpressions struct {
151+
// Current is the CEL expression that determines if the status
152+
// of the custom resource has reached the desired state.
153+
// +required
154+
Current string `json:"current"`
155+
// InProgress is the CEL expression that determines if the status
156+
// of the custom resource has not yet reached the desired state.
157+
// +optional
158+
InProgress string `json:"inProgress,omitempty"`
159+
// Failed is the CEL expression that determines if the status
160+
// of the custom resource has failed to reach the desired state.
161+
// +optional
162+
Failed string `json:"failed,omitempty"`
163+
}

apis/kustomize/zz_generated.deepcopy.go

+31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)