forked from Azure/acs-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upgradeworkflow.go
27 lines (22 loc) · 958 Bytes
/
upgradeworkflow.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
package kubernetesupgrade
// UpgradeWorkFlow outlines various individual high level steps
// that need to be run (one or more times) in the upgrade workflow.
type UpgradeWorkFlow interface {
// upgrade masters
// upgrade agent nodes
RunUpgrade() error
Validate() error
}
// UpgradeNode drives work flow of deleting and replacing a master or agent node to a
// specified target version of Kubernetes
type UpgradeNode interface {
// DeleteNode takes state/resources of the master/agent node from ListNodeResources
// backs up/preserves state as needed by a specific version of Kubernetes and then deletes
// the node.
// the second argument is a flag to invoke 'cordon and drain' flow.
DeleteNode(*string, bool) error
// CreateNode creates a new master/agent node with the targeted version of Kubernetes
CreateNode(string, int) error
// Validate will verify the that master/agent node has been upgraded as expected.
Validate(*string) error
}