Documentation ¶
Index ¶
- Constants
- func WriteTemplate(translator *i18n.Translator, upgradeContainerService *api.ContainerService, ...)
- type AgentPoolTopology
- type ClusterTopology
- type Kubernetes16upgrader
- type Kubernetes17upgrader
- type UpgradeAgentNode
- type UpgradeCluster
- type UpgradeMasterNode
- type UpgradeNode
- type UpgradeWorkFlow
- type Upgrader
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 Kubernetes16upgrader ¶ added in v0.6.0
type Kubernetes16upgrader struct {
Upgrader
}
Kubernetes16upgrader upgrades a Kubernetes 1.5 cluster to 1.6
func (*Kubernetes16upgrader) ClusterPreflightCheck ¶ added in v0.6.0
func (ku *Kubernetes16upgrader) ClusterPreflightCheck() error
ClusterPreflightCheck does preflight check
type Kubernetes17upgrader ¶ added in v0.6.0
type Kubernetes17upgrader struct {
Upgrader
}
Kubernetes17upgrader upgrades a Kubernetes 1.6 cluster to 1.7
func (*Kubernetes17upgrader) ClusterPreflightCheck ¶ added in v0.6.0
func (ku *Kubernetes17upgrader) ClusterPreflightCheck() error
ClusterPreflightCheck does preflight check
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 agent node to 1.6
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 master node to 1.6
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.
type Upgrader ¶ added in v0.6.0
type Upgrader struct { Translator *i18n.Translator ClusterTopology GoalStateDataModel *api.ContainerService UpgradeModel *api.UpgradeContainerService Client armhelpers.ACSEngineClient }
Upgrader holds information on upgrading an ACS cluster
func (*Upgrader) Init ¶ added in v0.6.0
func (ku *Upgrader) Init(translator *i18n.Translator, clusterTopology ClusterTopology, upgradeModel *api.UpgradeContainerService, client armhelpers.ACSEngineClient)
Init initializes an upgrader struct
func (*Upgrader) RunUpgrade ¶ added in v0.6.0
RunUpgrade runs the upgrade pipeline