cluster

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 51 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ReasonFailedProcess     = "FailedProcess"
	ReasonWaitingProcess    = "WaitingProcess"
	ReasonSuccessfulProcess = "SuccessfulProcess"
	ReasonSkipProcess       = "SkipProcess"

	ConditionTypeDone = "EnsureDone"
)

Variables

This section is empty.

Functions

func GetDNSIP

func GetDNSIP(svcSubnet string) (net.IP, error)

same as kubeadm GetDNSIP returns a dnsIP, which is 10th IP in svcSubnet CIDR range

func GetServiceCIDRAndNodeCIDRMaskSize

func GetServiceCIDRAndNodeCIDRMaskSize(clusterCIDR string, maxClusterServiceNum int32, maxNodePodNum int32) (string, int32, error)

Types

type Address

type Address platformv1.ClusterAddress

func (*Address) String

func (ca *Address) String() string

type Cluster

type Cluster struct {
	clusterprovider.Cluster
	*config.Config
	SSH map[string]ssh.Interface
}

func NewCluster

func NewCluster(c clusterprovider.Cluster, cfg *config.Config) (*Cluster, error)

func (*Cluster) AddAddress

func (c *Cluster) AddAddress(addrType platformv1.AddressType, host string, port int32)

func (*Cluster) Address

func (c *Cluster) Address(addrType platformv1.AddressType) *Address

func (*Cluster) Clientset

func (c *Cluster) Clientset() (*kubernetes.Clientset, error)

func (*Cluster) RemoveAddress

func (c *Cluster) RemoveAddress(addrType platformv1.AddressType)

func (*Cluster) SetCondition

func (c *Cluster) SetCondition(newCondition platformv1.ClusterCondition)

type Handler

type Handler func(*Cluster) error

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider() (*Provider, error)

func (*Provider) AfterCreate

func (p *Provider) AfterCreate(cluster platform.Cluster) ([]interface{}, error)

func (*Provider) EnsureCNIPlugins

func (p *Provider) EnsureCNIPlugins(c *Cluster) error

func (*Provider) EnsureClusterComplete

func (p *Provider) EnsureClusterComplete(cluster *Cluster) error

因为validate那里没法更新对象(不能存储) PreCrete,在api中错误只能panic,响应不会有报错提示,所以只能挪到这里处理

func (*Provider) EnsureCopyFiles

func (p *Provider) EnsureCopyFiles(c *Cluster) error

func (*Provider) EnsureDisableSwap

func (p *Provider) EnsureDisableSwap(c *Cluster) error

func (*Provider) EnsureDocker

func (p *Provider) EnsureDocker(c *Cluster) error

func (*Provider) EnsureGalaxy

func (p *Provider) EnsureGalaxy(c *Cluster) error

func (*Provider) EnsureJoinControlePlane

func (p *Provider) EnsureJoinControlePlane(c *Cluster) error

func (*Provider) EnsureKernelModule

func (p *Provider) EnsureKernelModule(c *Cluster) error

func (*Provider) EnsureKubeadm

func (p *Provider) EnsureKubeadm(c *Cluster) error

func (*Provider) EnsureKubeadmInitAddonPhase

func (p *Provider) EnsureKubeadmInitAddonPhase(c *Cluster) error

func (*Provider) EnsureKubeadmInitBootstrapTokenPhase

func (p *Provider) EnsureKubeadmInitBootstrapTokenPhase(c *Cluster) error

func (*Provider) EnsureKubeadmInitCertsPhase

func (p *Provider) EnsureKubeadmInitCertsPhase(c *Cluster) error

func (*Provider) EnsureKubeadmInitControlPlanePhase

func (p *Provider) EnsureKubeadmInitControlPlanePhase(c *Cluster) error

func (*Provider) EnsureKubeadmInitEtcdPhase

func (p *Provider) EnsureKubeadmInitEtcdPhase(c *Cluster) error

func (*Provider) EnsureKubeadmInitKubeConfigPhase

func (p *Provider) EnsureKubeadmInitKubeConfigPhase(c *Cluster) error

func (*Provider) EnsureKubeadmInitKubeletStartPhase

func (p *Provider) EnsureKubeadmInitKubeletStartPhase(c *Cluster) error

func (*Provider) EnsureKubeadmInitUploadCertsPhase

func (p *Provider) EnsureKubeadmInitUploadCertsPhase(c *Cluster) error

func (*Provider) EnsureKubeadmInitUploadConfigPhase

func (p *Provider) EnsureKubeadmInitUploadConfigPhase(c *Cluster) error

func (*Provider) EnsureKubeadmInitWaitControlPlanePhase

func (p *Provider) EnsureKubeadmInitWaitControlPlanePhase(c *Cluster) error

func (*Provider) EnsureKubeconfig

func (p *Provider) EnsureKubeconfig(c *Cluster) error

func (*Provider) EnsureKubelet

func (p *Provider) EnsureKubelet(c *Cluster) error

func (*Provider) EnsureMarkControlPlane

func (p *Provider) EnsureMarkControlPlane(c *Cluster) error

func (*Provider) EnsureNvidiaContainerRuntime

func (p *Provider) EnsureNvidiaContainerRuntime(c *Cluster) error

func (*Provider) EnsureNvidiaDevicePlugin

func (p *Provider) EnsureNvidiaDevicePlugin(c *Cluster) error

func (*Provider) EnsureNvidiaDriver

func (p *Provider) EnsureNvidiaDriver(c *Cluster) error

func (*Provider) EnsurePatchAnnotation

func (p *Provider) EnsurePatchAnnotation(c *Cluster) error

func (*Provider) EnsurePostInstallHook

func (p *Provider) EnsurePostInstallHook(c *Cluster) error

func (*Provider) EnsurePreInstallHook

func (p *Provider) EnsurePreInstallHook(c *Cluster) error

func (*Provider) EnsurePreflight

func (p *Provider) EnsurePreflight(c *Cluster) error

func (*Provider) EnsurePrepareForControlplane

func (p *Provider) EnsurePrepareForControlplane(c *Cluster) error

func (*Provider) EnsureRegistryHosts

func (p *Provider) EnsureRegistryHosts(c *Cluster) error

func (*Provider) EnsureStoreCredential

func (p *Provider) EnsureStoreCredential(c *Cluster) error

func (*Provider) EnsureSysctl

func (p *Provider) EnsureSysctl(c *Cluster) error

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) OnDelete

func (p *Provider) OnDelete(cluster platformv1.Cluster) error

func (*Provider) OnInitialize

func (p *Provider) OnInitialize(args clusterprovider.Cluster) (clusterprovider.Cluster, error)

func (*Provider) OnUpdate

func (*Provider) PreCreate

func (p *Provider) PreCreate(user clusterprovider.UserInfo, cluster platform.Cluster) (platform.Cluster, error)

func (*Provider) Validate

func (p *Provider) Validate(c platform.Cluster) (field.ErrorList, error)

func (*Provider) ValidateCredential

func (p *Provider) ValidateCredential(cluster clusterprovider.InternalCluster) (field.ErrorList, error)

func (*Provider) ValidateUpdate

func (p *Provider) ValidateUpdate(cluster platform.Cluster, oldCluster platform.Cluster) (field.ErrorList, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL