constants

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Hostname                      = "/etc/hostname"
	SysctlK8sConfig               = "/etc/sysctl.d/k8s.conf"
	StaticPodPath                 = "/etc/kubernetes/manifests"
	KubeletConfigureDir           = "/etc/kubernetes"
	KubeletWorkdir                = "/var/lib/kubelet"
	YurtHubWorkdir                = "/var/lib/yurthub"
	YurtHubBootstrapConfig        = "/var/lib/yurthub/bootstrap-hub.conf"
	OpenyurtDir                   = "/var/lib/openyurt"
	YurttunnelAgentWorkdir        = "/var/lib/yurttunnel-agent"
	YurttunnelServerWorkdir       = "/var/lib/yurttunnel-server"
	KubeCniDir                    = "/opt/cni/bin"
	KubeCniVersion                = "v0.8.0"
	KubeletServiceFilepath        = "/etc/systemd/system/kubelet.service"
	KubeletServiceConfPath        = "/etc/systemd/system/kubelet.service.d/10-kubeadm.conf"
	KubeletSvcPath                = "/usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf"
	PauseImagePath                = "registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.2"
	DefaultCertificatesDir        = "/etc/kubernetes/pki"
	DefaultDockerCRISocket        = "/var/run/dockershim.sock"
	YurthubYamlName               = "yurthub.yaml"
	YurthubStaticPodManifest      = "yurthub"
	YurthubNamespace              = "kube-system"
	YurthubYurtStaticSetName      = "yurt-hub"
	YurthubCloudYurtStaticSetName = "yurt-hub-cloud"
	// ManifestsSubDirName defines directory name to store manifests
	ManifestsSubDirName = "manifests"
	// KubeletKubeConfigFileName defines the file name for the kubeconfig that the control-plane kubelet will use for talking
	// to the API server
	KubeletKubeConfigFileName = "kubelet.conf"
	// KubeadmConfigConfigMap specifies in what ConfigMap in the kube-system namespace the `kubeadm init` configuration should be stored
	KubeadmConfigConfigMap = "kubeadm-config"
	// ClusterConfigurationConfigMapKey specifies in what ConfigMap key the cluster configuration should be stored
	ClusterConfigurationConfigMapKey = "ClusterConfiguration"
	// KubeadmJoinConfigFileName defines the file name for the JoinConfiguration that kubeadm will use for joining
	KubeadmJoinConfigFileName = "kubeadm-join.conf"
	// KubeadmJoinDiscoveryFileName defines the file name for the --discovery-file that kubeadm will use for joining
	KubeadmJoinDiscoveryFileName = "discovery.conf"

	KubeletHostname        = "--hostname-override=[^\"\\s]*"
	KubeletEnvironmentFile = "EnvironmentFile=.*"

	BootstrapTokenPattern = `\A([a-z0-9]{6})\.([a-z0-9]{16})\z`
	PlaceholderToken      = "abcdef.0123456789abcdef"

	DaemonReload      = "systemctl daemon-reload"
	RestartKubeletSvc = "systemctl restart kubelet"

	CniUrlFormat                    = "https://aliacs-edge-k8s-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/public/pkg/openyurt/cni/%s/cni-plugins-linux-%s-%s.tgz"
	DefaultKubernetesResourceServer = "dl.k8s.io"
	KubeadmUrlFormat                = "https://%s/release/%s/bin/linux/%s/kubeadm"
	KubeletUrlFormat                = "https://%s/release/%s/bin/linux/%s/kubelet"
	TmpDownloadDir                  = "/tmp"
	KubeadmInstallUrl               = "https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/"

	EdgeNode  = "edge"
	CloudNode = "cloud"

	// CertificatesDir
	CertificatesDir = "cert-dir"
	// ForceReset
	ForceReset = "force"
	// IgnorePreflightErrors sets the path a list of checks whose errors will be shown as warnings. Example: 'IsPrivilegedUser,Swap'. Value 'all' ignores errors from all checks.
	IgnorePreflightErrors = "ignore-preflight-errors"
	// KubernetesResourceServer flag sets the address for download k8s node resources.
	KubernetesResourceServer = "kubernetes-resource-server"
	// NodeCRISocket flag sets the CRI socket to connect to.
	NodeCRISocket = "cri-socket"
	// NodeLabels flag sets the labels for worker node.
	NodeLabels = "node-labels"
	// NodeName flag sets the node name.
	NodeName = "node-name"
	// NodePoolName flag sets the nodePool name.
	NodePoolName = "nodepool-name"
	// NodeType flag sets the type of worker node to edge or cloud.
	NodeType = "node-type"
	// Organizations flag sets the extra organizations of hub agent client certificate.
	Organizations = "organizations"
	// PauseImage flag sets the pause image for worker node.
	PauseImage = "pause-image"
	// CfgPath flag sets the path to a JoinConfiguration file.
	CfgPath = "config"
	// TokenStr flag sets both the discovery-token and the tls-bootstrap-token when those values are not provided
	TokenStr = "token"
	// TokenDiscoveryCAHash flag instruct kubeadm to validate that the root CA public key matches this hash (for token-based discovery)
	TokenDiscoveryCAHash = "discovery-token-ca-cert-hash"
	// TokenDiscoverySkipCAHash flag instruct kubeadm to skip CA hash verification (for token-based discovery)
	TokenDiscoverySkipCAHash = "discovery-token-unsafe-skip-ca-verification"
	// Namespace flag sets the namespace of yurthub staticpod manifest.
	Namespace = "namespace"
	// YurtHubImage flag sets the yurthub image for worker node.
	YurtHubImage = "yurthub-image"
	// YurtHubServerAddr flag set the address of yurthub server (not proxy server!)
	YurtHubServerAddr = "yurthub-server-addr"
	// ServerAddr flag set the address of kubernetes kube-apiserver
	ServerAddr = "server-addr"
	// ReuseCNIBin flag sets whether to reuse local CNI binaries or not.
	ReuseCNIBin = "reuse-cni-bin"
	// StaticPods flag set the specified static pods on this node want to install
	StaticPods = "static-pods"

	KubeletConfFileAvailableError = "FileAvailable--etc-kubernetes-kubelet.conf"
	ManifestsDirAvailableError    = "DirAvailable--etc-kubernetes-manifests"

	DefaultServerAddr            = "https://127.0.0.1:6443"
	ServerHealthzServer          = "127.0.0.1:10267"
	ServerHealthzURLPath         = "/v1/healthz"
	ServerReadyzURLPath          = "/v1/readyz"
	DefaultOpenYurtImageRegistry = "registry.cn-hangzhou.aliyuncs.com/openyurt"
	Yurthub                      = "yurthub"
	DefaultOpenYurtVersion       = "latest"
	DefaultYurtHubServerAddr     = "127.0.0.1"
	DirMode                      = 0755
	KubeletServiceContent        = `` /* 251-byte string literal not displayed */

	KubeletUnitConfig = `` /* 379-byte string literal not displayed */

	KubeletConfForNode = `` /* 278-byte string literal not displayed */

	KubeadmJoinConf = `` /* 758-byte string literal not displayed */

	YurthubTemplate = `` /* 1731-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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