kdmimages

package
v1.7.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The "images-all" file is only provided for RKE2 amd64 images. This may be subject to change.
	RKE2ImageLinux   = "https://github.com/rancher/rke2/releases/download/%s/rke2-images-all.linux-amd64.txt"
	RKE2ImageWindows = "https://github.com/rancher/rke2/releases/download/%s/rke2-images.windows-amd64.txt"
	K3SImageURL      = "https://github.com/k3s-io/k3s/releases/download/%s/k3s-images.txt"

	// CN mirror URL (some versions were not mirrored to the CN mirror, so use the global GitHub instead)
	RKE2ImageLinuxCN   = "https://rancher-mirror.rancher.cn/rke2/%s/rke2-images-all.linux-amd64.txt"
	RKE2ImageWindowsCN = "https://rancher-mirror.rancher.cn/rke2/%s/rke2-images.windows-amd64.txt"
	K3SImageURLCN      = "https://rancher-mirror.rancher.cn/k3s/%s/k3s-images.txt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterType added in v1.7.1

type ClusterType string
const (
	K3S  ClusterType = "k3s"
	RKE2 ClusterType = "rke2"
	RKE  ClusterType = "rke"
)

func (ClusterType) String added in v1.7.1

func (t ClusterType) String() string

type Getter added in v1.7.1

type Getter interface {
	// Get method is for getting the images and versions.
	Get(ctx context.Context) error

	// LinuxImageSet method gets the linux images and sources.
	LinuxImageSet() map[string]map[string]bool

	// WindowsImageSet method gets the Windows images and sources.
	WindowsImageSet() map[string]map[string]bool

	// VersionSet method gets the versions.
	VersionSet() map[string]bool

	// Source method gets the cluster type of getter.
	Source() ClusterType
}

Getter is the interface for getting images and versions from KDM data.

type K3sRKE2Getter added in v1.7.1

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

K3sRKE2Getter is the object to get RKE2 and K3s release & upgrade images

func NewK3sRKE2Getter added in v1.7.1

func NewK3sRKE2Getter(
	source ClusterType,
	rancherVersion string,
	minKubeVersion string,
	data map[string]any,
	skipTLS bool,
) (*K3sRKE2Getter, error)

func (*K3sRKE2Getter) Get added in v1.7.1

func (g *K3sRKE2Getter) Get(ctx context.Context) error

func (*K3sRKE2Getter) LinuxImageSet added in v1.7.1

func (g *K3sRKE2Getter) LinuxImageSet() map[string]map[string]bool

func (*K3sRKE2Getter) Source added in v1.7.1

func (g *K3sRKE2Getter) Source() ClusterType

func (*K3sRKE2Getter) VersionSet added in v1.7.1

func (g *K3sRKE2Getter) VersionSet() map[string]bool

func (*K3sRKE2Getter) WindowsImageSet added in v1.7.1

func (g *K3sRKE2Getter) WindowsImageSet() map[string]map[string]bool

type RKEGetter added in v1.7.1

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

RKEGetter is the object to get RKE images and versions.

func NewRKEGetter added in v1.7.1

func NewRKEGetter(rancherVersion string, data *kdm.Data) (*RKEGetter, error)

func (*RKEGetter) Get added in v1.7.1

func (g *RKEGetter) Get(ctx context.Context) error

func (*RKEGetter) LinuxImageSet added in v1.7.1

func (g *RKEGetter) LinuxImageSet() map[string]map[string]bool

func (*RKEGetter) Source added in v1.7.1

func (g *RKEGetter) Source() ClusterType

func (*RKEGetter) VersionSet added in v1.7.1

func (g *RKEGetter) VersionSet() map[string]bool

func (*RKEGetter) WindowsImageSet added in v1.7.1

func (g *RKEGetter) WindowsImageSet() map[string]map[string]bool

type RKEGetterOpts added in v1.7.1

type RKEGetterOpts struct {
	RancherVersion string
	Data           *kdm.Data
}

Jump to

Keyboard shortcuts

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