Skip to content
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

add healthcheck for application #2322

Open
wants to merge 1 commit into
base: tke-application
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions api/application/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,22 @@ type AppStatus struct {
// Dryrun result.
// +optional
Manifest string
// The healthStatus for the application
// +optional
HealthStatus string
// lastHealthCheckTime is the last health check time for the application
// +optional
LastHealthCheckTime metav1.Time
// healthCheckDetails is the detail info of last health check result
// +optional
HealthCheckDetails []HealthCheckDetail
}

type HealthCheckDetail struct {
WorkloadType string
WorkloadName string
PodDesiredNum int32
PodReadyNum int32
}

// +genclient
Expand Down
723 changes: 563 additions & 160 deletions api/application/v1/generated.pb.go

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions api/application/v1/generated.proto

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

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,11,opt,name=healthStatus"`
// lastHealthCheckTime is the last health check time for the application
// +optional
LastHealthCheckTime metav1.Time `json:"lastHealthCheckTime,omitempty" protobuf:"bytes,12,opt,name=lastHealthCheckTime"`
// healthCheckDetails is the detail info of last health check result
// +optional
HealthCheckDetails []HealthCheckDetail `json:"healthCheckDetails" protobuf:"bytes,13,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,1,opt,name=workloadType"`
WorkloadName string `json:"workloadName,omitempty" protobuf:"bytes,2,opt,name=workloadName"`
PodDesiredNum int32 `json:"podDesiredNum,omitempty" protobuf:"varint,3,opt,name=podDesiredNum"`
PodReadyNum int32 `json:"podReadyNum,omitempty" protobuf:"varint,4,opt,name=podReadyNum"`
}

const (
// Installing means the installation for the App is running.
AppPhaseInstalling AppPhase = "Installing"
Expand Down
25 changes: 14 additions & 11 deletions api/application/v1/types_swagger_doc_generated.go

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

42 changes: 42 additions & 0 deletions api/application/v1/zz_generated.conversion.go

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

22 changes: 22 additions & 0 deletions api/application/v1/zz_generated.deepcopy.go

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

22 changes: 22 additions & 0 deletions api/application/zz_generated.deepcopy.go

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

Loading
Loading