Skip to content

Commit

Permalink
add health check to status
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGuo2018 committed Jul 10, 2024
1 parent 17af153 commit 3041a84
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions api/application/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@ type AppStatus struct {
// Dryrun result.
// +optional
Manifest string `json:"manifest" protobuf:"bytes,10,opt,name=manifest"`
// The healthStatus for the application
// +optional
HealthStatus string `json:"healthStatus,omitempty" protobuf:"bytes,3,opt,name=healthStatus"`
// lastHealthCheckTime is the last health check time for the application
// +optional
LastHealthCheckTime metav1.Time `json:"lastHealthCheckTime,omitempty" protobuf:"bytes,4,opt,name=lastHealthCheckTime"`
// healthCheckDetails is the detail info of last health check result
// +optional
HealthCheckDetails []HealthCheckDetail `json:"healthCheckDetails" protobuf:"bytes,1,opt,name=healthCheckDetails"`
}

// +genclient
Expand Down Expand Up @@ -258,6 +267,13 @@ const (
// AppPhase indicates the phase of app.
type AppPhase string

type HealthCheckDetail struct {
WorkloadType string `json:"workloadType,omitempty" protobuf:"bytes,3,opt,name=workloadType"`
WorkloadName string `json:"workloadName,omitempty" protobuf:"bytes,3,opt,name=workloadName"`
PodDesiredNum int64 `json:"podDesiredNum,omitempty" protobuf:"varint,2,opt,name=podDesiredNum"`
PodReadyNum int64 `json:"podReadyNum,omitempty" protobuf:"varint,2,opt,name=podReadyNum"`
}

const (
// Installing means the installation for the App is running.
AppPhaseInstalling AppPhase = "Installing"
Expand Down

0 comments on commit 3041a84

Please sign in to comment.