-
Notifications
You must be signed in to change notification settings - Fork 15
/
phase.go
50 lines (45 loc) · 1.5 KB
/
phase.go
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
41
42
43
44
45
46
47
48
49
50
package cke
import "time"
// OperationPhase represents the processing status of CKE server.
type OperationPhase string
// Processing statuses of CKE server.
const (
PhaseUpgradeAborted = OperationPhase("upgrade-aborted")
PhaseUpgrade = OperationPhase("upgrade")
PhaseRivers = OperationPhase("rivers")
PhaseEtcdBootAborted = OperationPhase("etcd-boot-aborted")
PhaseEtcdBoot = OperationPhase("etcd-boot")
PhaseEtcdStart = OperationPhase("etcd-start")
PhaseEtcdWait = OperationPhase("etcd-wait")
PhaseK8sStart = OperationPhase("k8s-start")
PhaseEtcdMaintain = OperationPhase("etcd-maintain")
PhaseK8sMaintain = OperationPhase("k8s-maintain")
PhaseStopCP = OperationPhase("stop-control-plane")
PhaseRepairMachines = OperationPhase("repair-machines")
PhaseUncordonNodes = OperationPhase("uncordon-nodes")
PhaseRebootNodes = OperationPhase("reboot-nodes")
PhaseCompleted = OperationPhase("completed")
)
// AllOperationPhases contains all kinds of OperationPhases.
var AllOperationPhases = []OperationPhase{
PhaseUpgradeAborted,
PhaseUpgrade,
PhaseRivers,
PhaseEtcdBootAborted,
PhaseEtcdBoot,
PhaseEtcdStart,
PhaseEtcdWait,
PhaseK8sStart,
PhaseEtcdMaintain,
PhaseK8sMaintain,
PhaseStopCP,
PhaseRepairMachines,
PhaseUncordonNodes,
PhaseRebootNodes,
PhaseCompleted,
}
// ServerStatus represents the current server status.
type ServerStatus struct {
Phase OperationPhase `json:"phase"`
Timestamp time.Time `json:"timestamp"`
}