Skip to content

Commit a193af9

Browse files
committed
deployer: add health check
1 parent 0c9050b commit a193af9

File tree

1 file changed

+33
-21
lines changed

1 file changed

+33
-21
lines changed

deployer.go

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -84,27 +84,39 @@ type DeployerCommandDeploymentDeployBillingConfig struct {
8484
}
8585

8686
type DeployerCommandDeploymentDeploySpec struct {
87-
Image string `json:"image"`
88-
Env map[string]string `json:"env"`
89-
Command []string `json:"command"`
90-
Args []string `json:"args"`
91-
WorkloadIdentityName string `json:"workloadIdentityName"`
92-
MinReplicas int `json:"minReplicas"`
93-
MaxReplicas int `json:"maxReplicas"`
94-
Port int `json:"port"`
95-
Protocol DeploymentProtocol `json:"protocol"`
96-
Internal bool `json:"internal"`
97-
Schedule string `json:"schedule"`
98-
Annotations map[string]string `json:"annotations"`
99-
CPU string `json:"cpu"`
100-
CPULimit string `json:"cpuLimit"`
101-
Memory string `json:"memory"`
102-
PullSecretName string `json:"pullSecretName"`
103-
DiskName string `json:"diskName"`
104-
DiskMountPath string `json:"diskMountPath"`
105-
DiskSubPath string `json:"diskSubPath"`
106-
MountData map[string]string `json:"mountData"` // file path => data
107-
Sidecars []*Sidecar `json:"sidecars"`
87+
Image string `json:"image"`
88+
Env map[string]string `json:"env"`
89+
Command []string `json:"command"`
90+
Args []string `json:"args"`
91+
WorkloadIdentityName string `json:"workloadIdentityName"`
92+
MinReplicas int `json:"minReplicas"`
93+
MaxReplicas int `json:"maxReplicas"`
94+
Port int `json:"port"`
95+
Protocol DeploymentProtocol `json:"protocol"`
96+
Internal bool `json:"internal"`
97+
Schedule string `json:"schedule"`
98+
Annotations map[string]string `json:"annotations"`
99+
CPU string `json:"cpu"`
100+
CPULimit string `json:"cpuLimit"`
101+
Memory string `json:"memory"`
102+
PullSecretName string `json:"pullSecretName"`
103+
DiskName string `json:"diskName"`
104+
DiskMountPath string `json:"diskMountPath"`
105+
DiskSubPath string `json:"diskSubPath"`
106+
MountData map[string]string `json:"mountData"` // file path => data
107+
Sidecars []*Sidecar `json:"sidecars"`
108+
HealthCheck DeploymentHealthCheck `json:"healthCheck"`
109+
}
110+
111+
type DeploymentHealthCheck struct {
112+
TCPSocket *TCPSocketAction `json:"tcpSocket"`
113+
HTTPGet *HTTPGetAction `json:"httpGet"`
114+
}
115+
116+
type TCPSocketAction struct{}
117+
118+
type HTTPGetAction struct {
119+
Path string `json:"path"`
108120
}
109121

110122
type DeployerCommandRouteCreate struct {

0 commit comments

Comments
 (0)