components

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: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefaultDockerCRISocket defines the default Docker CRI socket
	DefaultDockerCRISocket = "/var/run/dockershim.sock"

	// PullImageRetry specifies how many times ContainerRuntime retries when pulling image failed
	PullImageRetry = 5
)
View Source
const (
	KubeletSvcEnv           = "KUBELET_SVC"
	KubeletSvcPathSystemUsr = "/usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf"
	KubelerSvcPathSystemEtc = "/etc/systemd/system/kubelet.service.d/10-kubeadm.conf"
)
View Source
const (
	DefaultRootDir = "/var/lib"
	DefaultCaPath  = "/etc/kubernetes/pki/ca.crt"
)

Variables

This section is empty.

Functions

func DetectCRISocket

func DetectCRISocket() (string, error)

DetectCRISocket uses a list of known CRI sockets to detect one. If more than one or none is discovered, an error is returned.

func GetApiServerAddress

func GetApiServerAddress(kubeadmConfPaths []string) (string, error)

GetApiServerAddress parse apiServer address from conf file

func GetDefaultKubeadmConfPath

func GetDefaultKubeadmConfPath() []string

func NewKubeletOperator

func NewKubeletOperator(openyurtDir string) *kubeletOperator

NewKubeletOperator create kubeletOperator

func NewYurthubOperator

func NewYurthubOperator(apiServerAddr string, yurthubImage string, joinToken string,
	workingMode util.WorkingMode, yurthubHealthCheckTimeout time.Duration, enableDummyIf, enableNodePool bool) *yurtHubOperator

NewYurthubOperator new yurtHubOperator struct

func UnInstallYurtTunnelAgent added in v0.7.0

func UnInstallYurtTunnelAgent() error

func UnInstallYurtTunnelServer added in v0.7.0

func UnInstallYurtTunnelServer() error

Types

type CRIRuntime

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

CRIRuntime is a struct that interfaces with the CRI

func (*CRIRuntime) ImageExists

func (runtime *CRIRuntime) ImageExists(image string) (bool, error)

ImageExists checks to see if the image exists on the system

func (*CRIRuntime) IsDocker

func (runtime *CRIRuntime) IsDocker() bool

IsDocker returns true if the runtime is docker

func (*CRIRuntime) PullImage

func (runtime *CRIRuntime) PullImage(image string) error

PullImage pulls the image

type ContainerRuntimeForImage

type ContainerRuntimeForImage interface {
	IsDocker() bool
	PullImage(image string) error
	ImageExists(image string) (bool, error)
}

ContainerRuntime is an interface for working with container runtimes

func NewContainerRuntimeForImage

func NewContainerRuntimeForImage(execer utilsexec.Interface, criSocket string) (ContainerRuntimeForImage, error)

NewContainerRuntime sets up and returns a ContainerRuntime struct

type DockerRuntime

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

DockerRuntime is a struct that interfaces with the Docker daemon

func (*DockerRuntime) ImageExists

func (runtime *DockerRuntime) ImageExists(image string) (bool, error)

ImageExists checks to see if the image exists on the system

func (*DockerRuntime) IsDocker

func (runtime *DockerRuntime) IsDocker() bool

IsDocker returns true if the runtime is docker

func (*DockerRuntime) PullImage

func (runtime *DockerRuntime) PullImage(image string) error

PullImage pulls the image

Jump to

Keyboard shortcuts

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