runtime

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterImagePlatform

func GetClusterImagePlatform(rootfs string) (cp ocispecs.Platform)

func IsInContainer

func IsInContainer() bool

func RemoteCertCmd added in v0.9.0

func RemoteCertCmd(altNames []string, hostIP net.IP, hostName, serviceCIRD, DNSDomain string) string

Types

type ClusterRuntime

type ClusterRuntime string
const (
	K0s ClusterRuntime = "k0s"
	K3s ClusterRuntime = "k3s"
	K8s ClusterRuntime = "k8s"
)

type Driver added in v0.9.0

type Driver interface {
	client.Client

	GetAdminKubeconfig() string
}

type Installer added in v0.9.0

type Installer interface {
	// Install exec init phase for cluster. TODO: make the annotation more comprehensive
	Install() error

	GetCurrentRuntimeDriver() (Driver, error)

	// Reset exec reset phase for cluster.TODO: make the annotation more comprehensive
	Reset() error
	// ScaleUp exec joining phase for cluster, add master role for these nodes. net.IP is the master node IP array.
	ScaleUp(newMasters, newWorkers []net.IP) error
	// ScaleDown exec deleting phase for deleting cluster master role nodes. net.IP is the master node IP array.
	ScaleDown(mastersToDelete, workersToDelete []net.IP) error

	// Upgrade exec upgrading phase for cluster.TODO: make the annotation more comprehensive
	Upgrade() error
}

type Metadata

type Metadata struct {
	Version string `json:"version"`
	Arch    string `json:"arch"`
	Variant string `json:"variant"`
	// KubeVersion is a SemVer constraint specifying the version of Kubernetes required.
	KubeVersion string `json:"kubeVersion"`
	NydusFlag   bool   `json:"NydusFlag"`
	// ClusterRuntime is a flag to distinguish the runtime for k0s、k8s、k3s
	ClusterRuntime ClusterRuntime `json:"ClusterRuntime"`
}

Metadata use file Metadata in rootfs to help cluster install.

func LoadMetadata

func LoadMetadata(rootfs string) (*Metadata, error)

LoadMetadata :read metadata via ClusterImage name.

Directories

Path Synopsis
k0s

Jump to

Keyboard shortcuts

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