Documentation
¶
Index ¶
- Constants
- Variables
- func AddNeedUpgradeLabel(platformClient platformv1client.PlatformV1Interface, ...) error
- func ContainerLabelOfControlPlane(c *v1.Cluster, name string) string
- func Init(s ssh.Interface, kubeadmConfig *InitConfig, phase string, preActions ...string) error
- func Install(s ssh.Interface, option *Option) 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(c *v1.Cluster, s ssh.Interface) error
- func Reset(s ssh.Interface, phase string) error
- func RestartContainerByLabel(c *v1.Cluster, s ssh.Interface, label string) error
- func RestartControlPlane(c *v1.Cluster, s ssh.Interface) error
- func UpgradeNode(s ssh.Interface, client kubernetes.Interface, ...) (upgraded bool, err error)
- type InitConfig
- type NodeRole
- type Option
- 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 ContainerLabelOfControlPlane ¶ added in v1.8.0
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 RestartContainerByLabel ¶ added in v1.8.0
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 Option ¶ added in v1.8.0
type Option struct { RuntimeType platformv1.ContainerRuntimeType Version string }
type UpgradeOption ¶ added in v1.3.1
Click to show internal directories.
Click to hide internal directories.