common

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MASTER = "master"
	// TODO,警惕,不能通过此标志来获取worker,因为master也可以role=node
	NODE = "node"
)
View Source
const (
	Docker     = "docker"
	Containerd = "containerd"
)
View Source
const (
	K0s string = "k0s"
	K3s string = "k3s"
	K8s string = "kubernetes"
)
View Source
const (
	DefaultLogDir            = "/var/lib/sealer/log"
	DefaultSealerDataDir     = "/var/lib/sealer/data"
	KubeAdminConf            = "/etc/kubernetes/admin.conf"
	ClusterfileName          = "ClusterfileName"
	KubeLvsCareStaticPodName = "kube-lvscare"
	RegLvsCareStaticPodName  = "reg-lvscare"
	StaticPodDir             = "/etc/kubernetes/manifests"
	LvsCareRepoAndTag        = "sealerio/lvscare:v1.1.3-beta.8"
)

Default dir and file path

View Source
const (
	EnvHostIP                 = "HostIP"
	EnvHostIPFamily           = "HostIPFamily"
	EnvContainerRuntime       = "ContainerRuntime"
	EnvIPv6DualStack          = "IPv6DualStack"
	EnvRegistryDomain         = "RegistryDomain"
	EnvRegistryPort           = "RegistryPort"
	EnvRegistryURL            = "RegistryURL"
	EnvLocalRegistryDomain    = "LocalRegistryDomain"
	EnvLocalRegistryPort      = "LocalRegistryPort"
	EnvLocalRegistryURL       = "LocalRegistryURL"
	EnvExternalRegistryDomain = "ExternalRegistryDomain"
	EnvExternalRegistryPort   = "ExternalRegistryPort"
	EnvExternalRegistryURL    = "ExternalRegistryURL"
	EnvCertSANs               = "CertSANs"
	EnvIPvsVIPForIPv4         = "IPvsVIPv4"
	EnvIPvsVIPForIPv6         = "IPvsVIPv6"
	EnvSvcCIDR                = "SvcCIDR"
	EnvPodCIDR                = "PodCIDR"
	EnvDNSSvcIP               = "DNSSvcIP"
	EnvKubeSvcIP              = "KubeSvcIP"
	EnvUseIPasNodeName        = "UseIPasNodeName"
)

Envs

View Source
const (
	ApplyModeApply     = "apply"
	ApplyModeLoadImage = "loadImage"
)
View Source
const (
	DefaultMetadataName         = "Metadata"
	DefaultRegistryDomain       = "sea.hub"
	DefaultRegistryPort         = 5000
	DefaultRegistryURL          = "sea.hub:5000"
	DefaultRegistryHtPasswdFile = "registry_htpasswd"
)

image module

View Source
const (
	AliDomain       = "sea.aliyun.com/"
	Eip             = AliDomain + "ClusterEIP"
	RegistryDirName = "registry"
)

about infra

View Source
const (
	KubeletConfiguration   = "KubeletConfiguration"
	KubeProxyConfiguration = "KubeProxyConfiguration"
)

CRD kind

View Source
const (
	TAINT    = "TAINT"
	LABEL    = "LABEL"
	HOSTNAME = "HOSTNAME"
)

plugin type

View Source
const (
	DefaultVIP             = "10.103.97.2"
	DefaultVIPForIPv6      = "1248:4003:10bb:6a01:83b9:6360:c66d:0002"
	DefaultAPIserverDomain = "apiserver.cluster.local"
)

default cluster runtime configuration

View Source
const (
	BAREMETAL = "BAREMETAL"
	AliCloud  = "ALI_CLOUD"
	CONTAINER = "CONTAINER"
)
View Source
const (
	FileMode0755 = 0755
	FileMode0644 = 0644
)
View Source
const (
	CdAndExecCmd        = "cd %s && %s"
	CdIfExistAndExecCmd = "if [ ! -d %s ];then exit 0;fi; cd %s && %s"
)
View Source
const (
	ExecBinaryFileName = "sealer"
	ROOT               = "root"
	WINDOWS            = "windows"
)
View Source
const APIServerDomain = "apiserver.cluster.local"
View Source
const (
	MasterRoleLabel = "node-role.kubernetes.io/master"
)

Variables

View Source
var (
	StdOut = os.Stdout

	StdErr = os.Stderr
)

Functions

func DefaultKubeConfigDir

func DefaultKubeConfigDir() string

func DefaultRegistryAuthConfigDir

func DefaultRegistryAuthConfigDir() string

func GetDefaultApplicationFile added in v0.9.0

func GetDefaultApplicationFile() string

func GetDefaultClusterfile added in v0.9.0

func GetDefaultClusterfile() string

func GetHomeDir

func GetHomeDir() string

func GetSealerWorkDir added in v0.9.0

func GetSealerWorkDir() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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