Skip to content

Commit

Permalink
Add healthcheck expressions to kustomize types
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
  • Loading branch information
matheuscscp committed Jan 23, 2025
1 parent 528bc56 commit 066f028
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions apis/kustomize/kustomize_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,32 @@ type JSON6902Patch struct {
// +required
Target Selector `json:"target"`
}

// CustomHealthCheck defines the health check for custom resources.
type CustomHealthCheck struct {
// APIVersion of the custom resource under evaluation.
// +required
APIVersion string `json:"apiVersion"`
// Kind of the custom resource under evaluation.
// +required
Kind string `json:"kind"`

HealthCheckExpressions `json:",inline"`
}

// HealthCheckExpressions defines the CEL expressions for determining the health status
// of custom resources.
type HealthCheckExpressions struct {
// Current is the CEL expression that determines if the status
// of the custom resource has reached the desired state.
// +required
Current string `json:"current"`
// InProgress is the CEL expression that determines if the status
// of the custom resource has not yet reached the desired state.
// +optional
InProgress string `json:"inProgress,omitempty"`
// Failed is the CEL expression that determines if the status
// of the custom resource has failed to reach the desired state.
// +optional
Failed string `json:"failed,omitempty"`
}

0 comments on commit 066f028

Please sign in to comment.