Documentation ¶
Index ¶
Constants ¶
View Source
const ( LabelNodeRoleMaster = "node-role.kubernetes.io/master" // AnnotationUpgradeID is the annotation key for an upgrade's identifier. AnnotationUpgradeID = annotationPrefix + "id" AnnotationMachineNameBase = annotationPrefix + "machine-name-base" // GetNodesClusterRoleName defines the name of the ClusterRole and ClusterRoleBinding to get nodes GetNodesClusterRoleName = "kubeadm:get-nodes" // NodeBootstrapTokenAuthGroup specifies which group a Node Bootstrap Token should be authenticated in NodeBootstrapTokenAuthGroup = "system:bootstrappers:kubeadm:default-node-token" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ManagementCluster ManagementClusterConfig `json:"managementCluster"` TargetCluster TargetClusterConfig `json:"targetCluster"` KubernetesVersion string `json:"kubernetesVersion"` UpgradeID string `json:"upgradeID"` Patches PatchConfig `json:"patches"` MachineTimeout metav1.Duration `json:"machineTimeout"` }
Config contains all the configurations necessary to upgrade a Kubernetes cluster.
type ControlPlaneUpgrader ¶
type ControlPlaneUpgrader struct {
// contains filtered or unexported fields
}
func NewControlPlaneUpgrader ¶
func NewControlPlaneUpgrader(log logr.Logger, config Config) (*ControlPlaneUpgrader, error)
func (*ControlPlaneUpgrader) GetNodeFromProviderID ¶
func (u *ControlPlaneUpgrader) GetNodeFromProviderID(providerID string) *v1.Node
func (*ControlPlaneUpgrader) UpdateProviderIDsToNodes ¶
func (u *ControlPlaneUpgrader) UpdateProviderIDsToNodes() error
UpdateProviderIDsToNodes retrieves a map that pairs a providerID to the node by listing all Nodes providerID : Node
func (*ControlPlaneUpgrader) Upgrade ¶
func (u *ControlPlaneUpgrader) Upgrade() error
Upgrade does the upgrading of the control plane.
type ManagementClusterConfig ¶
type ManagementClusterConfig struct { // Kubeconfig is a path to a kubeconfig Kubeconfig string `json:"kubeconfig"` Context string `json:"context"` }
ManagementClusterConfig is the Kubeconfig and relevant information to connect to the management cluster of the worker cluster being upgraded.
type PatchConfig ¶ added in v0.2.0
type PatchConfig struct { Infrastructure string `json:"infrastructure"` Bootstrap string `json:"bootstrap"` KubeadmConfigMap string `json:"kubeadmConfigMap"` }
PatchConfig contains JSON patch documents for modifying a Machine's referenced infrastructure and bootstrap resources.
type TargetClusterConfig ¶
TargetClusterConfig are all the necessary configs of the Kubernetes cluster being upgraded.
Click to show internal directories.
Click to hide internal directories.