Documentation ¶
Index ¶
- Constants
- Variables
- func AddNeedUpgradeLabel(platformClient platformv1client.PlatformV1Interface, ...) error
- func DockerFilterForControlPlane(name string) string
- func Init(s ssh.Interface, kubeadmConfig *InitConfig, phase string, preActions ...string) error
- func Install(s ssh.Interface, version string) error
- func Join(s ssh.Interface, config *kubeadmv1beta2.JoinConfiguration, phase string, ...) error
- func MarkNextUpgradeWorkerNode(client kubernetes.Interface, ...) error
- func MarshalToYAML(obj runtime.Object) ([]byte, error)
- func RemoveUpgradeLabel(platformClient platformv1client.PlatformV1Interface, ...) error
- func RenewCerts(s ssh.Interface) error
- func Reset(s ssh.Interface, phase string) error
- func RestartContainerByFilter(s ssh.Interface, filter string) error
- func RestartControlPlane(s ssh.Interface) error
- func UpgradeNode(s ssh.Interface, client kubernetes.Interface, ...) (upgraded bool, err error)
- type InitConfig
- type NodeRole
- type UpgradeOption
Constants ¶
View Source
const ( NodeRoleMaster = NodeRole("Master") NodeRoleWorker = NodeRole("Worker") )
View Source
const ( // WillUpgrade is value of label platform.tkestack.io/need-upgrade // machines with this value will upgrade it's node automatically one by one WillUpgrade = "willUpgrade" )
Variables ¶
View Source
var AddToScheme = localSchemeBuilder.AddToScheme
View Source
var Codecs = serializer.NewCodecFactory(Scheme)
View Source
var Scheme = runtime.NewScheme()
Functions ¶
func AddNeedUpgradeLabel ¶ added in v1.6.0
func AddNeedUpgradeLabel(platformClient platformv1client.PlatformV1Interface, clusterName, labelValue string) error
func DockerFilterForControlPlane ¶ added in v1.3.1
func Join ¶ added in v1.3.1
func Join(s ssh.Interface, config *kubeadmv1beta2.JoinConfiguration, phase string, endPointIPs []string) error
func MarkNextUpgradeWorkerNode ¶ added in v1.3.1
func MarkNextUpgradeWorkerNode(client kubernetes.Interface, platformClient platformv1client.PlatformV1Interface, version, clusterName string) error
markNextUpgradeWorkerNode marks next wokrer node to be upgraded.
func MarshalToYAML ¶ added in v1.3.1
MarshalToYaml marshals an object into yaml.
func RemoveUpgradeLabel ¶ added in v1.6.0
func RemoveUpgradeLabel(platformClient platformv1client.PlatformV1Interface, machine *platformv1.Machine) error
func RenewCerts ¶ added in v1.3.1
func RestartContainerByFilter ¶ added in v1.3.1
func RestartControlPlane ¶ added in v1.3.1
func UpgradeNode ¶ added in v1.3.1
func UpgradeNode(s ssh.Interface, client kubernetes.Interface, platformClient platformv1client.PlatformV1Interface, logger log.Logger, cluster *v1.Cluster, option UpgradeOption) (upgraded bool, err error)
UpgradeNode upgrades node by kubeadm. Refer: https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/
Types ¶
type InitConfig ¶ added in v1.3.1
type InitConfig struct { InitConfiguration *kubeadmv1beta2.InitConfiguration ClusterConfiguration *kubeadmv1beta2.ClusterConfiguration KubeletConfiguration *kubeletv1beta1.KubeletConfiguration KubeProxyConfiguration *kubeproxyv1alpha1.KubeProxyConfiguration }
func (*InitConfig) Marshal ¶ added in v1.3.1
func (c *InitConfig) Marshal() ([]byte, error)
type UpgradeOption ¶ added in v1.3.1
Click to show internal directories.
Click to hide internal directories.