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 30, 2025
1 parent f39dac4 commit 30698ce
Show file tree
Hide file tree
Showing 2 changed files with 60 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"`
}
31 changes: 31 additions & 0 deletions apis/kustomize/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 30698ce

Please sign in to comment.