Documentation ¶
Index ¶
- Constants
- func DetectCRISocket() (string, error)
- func GetApiServerAddress(kubeadmConfPaths []string) (string, error)
- func GetDefaultKubeadmConfPath() []string
- func NewKubeletOperator(openyurtDir string) *kubeletOperator
- func NewYurthubOperator(apiServerAddr string, yurthubImage string, joinToken string, ...) *yurtHubOperator
- func UnInstallYurtTunnelAgent() error
- func UnInstallYurtTunnelServer() error
- type CRIRuntime
- type ContainerRuntimeForImage
- type DockerRuntime
Constants ¶
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 )
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" )
Variables ¶
This section is empty.
Functions ¶
func DetectCRISocket ¶
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 ¶
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