-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpts.go
More file actions
40 lines (34 loc) · 1.45 KB
/
pts.go
File metadata and controls
40 lines (34 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package api
// Ptype defines the structure of ptype deployment.
type Ptype struct {
Name string `json:"name"`
Release string `json:"release"`
Ready string `json:"ready"`
UpToDate int `json:"up_to_date"`
AvailableReplicas int `json:"available_replicas"`
Started string `json:"started"`
}
// Ptypes defines a collection of app Ptypes.
type Ptypes []Ptype
func (d Ptypes) Len() int { return len(d) }
func (d Ptypes) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
func (d Ptypes) Less(i, j int) bool { return d[i].Name < d[j].Name }
// PtypeState defines a ptype deployment state.
type PtypeState struct {
Container string `json:"container"`
Image string `json:"image"`
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
StartupProbe Healthcheck `json:"startup_probe,omitempty"`
LivenessProbe Healthcheck `json:"liveness_probe,omitempty"`
ReadinessProbe Healthcheck `json:"readiness_probe,omitempty"`
Limits map[string]string `json:"limits,omitempty"`
VolumeMounts []VolumeMount `json:"volume_mounts,omitempty"`
NodeSelector map[string]string `json:"node_selector,omitempty"`
}
type VolumeMount struct {
Name string `json:"name"`
MountPath string `json:"mountPath"`
}
// PtypesState defines a collection of container state.
type PtypeStates []PtypeState