Documentation ¶
Index ¶
Constants ¶
const MasterVMNamePrefix = "k8s-master-"
MasterVMNamePrefix is the prefix for all master VM names for Kubernetes clusters
Variables ¶
This section is empty.
Functions ¶
func WriteTemplate ¶
func WriteTemplate( translator *i18n.Translator, upgradeContainerService *api.ContainerService, templateMap map[string]interface{}, parametersMap map[string]interface{})
WriteTemplate writes upgrade template to a folder
Types ¶
type AgentPoolTopology ¶
type AgentPoolTopology struct { Identifier *string Name *string AgentVMs *[]compute.VirtualMachine UpgradedAgentVMs *[]compute.VirtualMachine }
AgentPoolTopology contains agent VMs in a single pool
type ClusterTopology ¶
type ClusterTopology struct { DataModel *api.ContainerService ResourceGroup string NameSuffix string AgentPools map[string]*AgentPoolTopology MasterVMs *[]compute.VirtualMachine UpgradedMasterVMs *[]compute.VirtualMachine }
ClusterTopology contains resources of the cluster the upgrade operation is targeting
type Kubernetes162upgrader ¶
type Kubernetes162upgrader struct { Translator *i18n.Translator ClusterTopology GoalStateDataModel *api.ContainerService Client armhelpers.ACSEngineClient }
Kubernetes162upgrader upgrades a Kubernetes 1.5.3 cluster to 1.6.2
func (*Kubernetes162upgrader) ClusterPreflightCheck ¶
func (ku *Kubernetes162upgrader) ClusterPreflightCheck() error
ClusterPreflightCheck does preflight check
func (*Kubernetes162upgrader) RunUpgrade ¶
func (ku *Kubernetes162upgrader) RunUpgrade() error
RunUpgrade runs the upgrade pipeline
func (*Kubernetes162upgrader) Validate ¶
func (ku *Kubernetes162upgrader) Validate() error
Validate will run validation post upgrade
type UpgradeAgentNode ¶
type UpgradeAgentNode struct { Translator *i18n.Translator TemplateMap map[string]interface{} ParametersMap map[string]interface{} UpgradeContainerService *api.ContainerService ResourceGroup string Client armhelpers.ACSEngineClient }
UpgradeAgentNode upgrades a Kubernetes 1.5.3 agent node to 1.6.2
func (*UpgradeAgentNode) CreateNode ¶
func (kan *UpgradeAgentNode) CreateNode(poolName string, agentNo int) error
CreateNode creates a new master/agent node with the targeted version of Kubernetes
func (*UpgradeAgentNode) DeleteNode ¶
func (kan *UpgradeAgentNode) DeleteNode(vmName *string) error
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
func (*UpgradeAgentNode) Validate ¶
func (kan *UpgradeAgentNode) Validate() error
Validate will verify the that master/agent node has been upgraded as expected.
type UpgradeCluster ¶
type UpgradeCluster struct { Translator *i18n.Translator ClusterTopology Client armhelpers.ACSEngineClient UpgradeModel *api.UpgradeContainerService }
UpgradeCluster upgrades a cluster with Orchestrator version X (or X.X or X.X.X) to version y (or Y.Y or X.X.X). RIght now upgrades are supported for Kubernetes cluster only.
func (*UpgradeCluster) UpgradeCluster ¶
func (uc *UpgradeCluster) UpgradeCluster(subscriptionID uuid.UUID, resourceGroup string, cs *api.ContainerService, ucs *api.UpgradeContainerService, nameSuffix string) error
UpgradeCluster runs the workflow to upgrade a Kubernetes cluster. UpgradeContainerService contains target state of the cluster that the operation will drive towards.
type UpgradeMasterNode ¶
type UpgradeMasterNode struct { Translator *i18n.Translator TemplateMap map[string]interface{} ParametersMap map[string]interface{} UpgradeContainerService *api.ContainerService ResourceGroup string Client armhelpers.ACSEngineClient }
UpgradeMasterNode upgrades a Kubernetes 1.5.3 master node to 1.6.2
func (*UpgradeMasterNode) CreateNode ¶
func (kmn *UpgradeMasterNode) CreateNode(poolName string, masterNo int) error
CreateNode creates a new master/agent node with the targeted version of Kubernetes
func (*UpgradeMasterNode) DeleteNode ¶
func (kmn *UpgradeMasterNode) DeleteNode(vmName *string) error
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
func (*UpgradeMasterNode) Validate ¶
func (kmn *UpgradeMasterNode) Validate() error
Validate will verify the that master/agent node has been upgraded as expected.
type UpgradeNode ¶
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 DeleteNode(*string) 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() error }
UpgradeNode drives work flow of deleting and replacing a master or agent node to a specified target version of Kubernetes
type UpgradeWorkFlow ¶
type UpgradeWorkFlow interface { ClusterPreflightCheck() error // upgrade masters // upgrade agent nodes RunUpgrade() error Validate() error }
UpgradeWorkFlow outlines various individual high level steps that need to be run (one or more times) in the upgrade workflow.