cri

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CapabilityPull    = "pull"
	CapabilityPush    = "push"
	CapabilityResolve = "resolve"
)
View Source
const (

	// containerdDefaultVersion    = "1.6.4"
	ContainerdDefaultConfigDir         = "/etc/containerd"
	ContainerdDefaultRegistryConfigDir = "/etc/containerd/certs.d"
)
View Source
const ConfigTomlTemplate = `` /* 7213-byte string literal not displayed */

not implement Registry TLS

Variables

View Source
var (
	DockerInsecureRegistryConfigureIdentity = fmt.Sprintf(
		component.RegisterStepKeyFormat, criDocker, criVersion, component.TypeRegistryConfigure)
	ContainerdRegistryConfigureIdentity = fmt.Sprintf(
		component.RegisterStepKeyFormat, criContainerd, criVersion, component.TypeRegistryConfigure)
)

Functions

func MatchPauseVersion added in v1.3.1

func MatchPauseVersion(kubeVersion string) string

MatchPauseVersion match pause images version

func ToContainerdRegistryConfig added in v1.3.1

func ToContainerdRegistryConfig(registries []v1.RegistrySpec) map[string]*ContainerdRegistry

func ToDockerInsecureRegistry added in v1.3.1

func ToDockerInsecureRegistry(registries []v1.RegistrySpec) []string

Types

type Base

type Base struct {
	Version     string            `json:"version,omitempty"`
	Offline     bool              `json:"offline"`
	DataRootDir string            `json:"rootDir"`
	Registies   []v1.RegistrySpec `json:"registry,omitempty"`
}

type ContainerdHost added in v1.1.1

type ContainerdHost struct {
	Scheme       string // http or https
	Host         string
	Capabilities []string
	SkipVerify   bool
	CA           []byte
}

type ContainerdRegistry added in v1.1.1

type ContainerdRegistry struct {
	Server string // not contain scheme, example: docker.io
	Hosts  []ContainerdHost
}

type ContainerdRegistryConfigure added in v1.3.1

type ContainerdRegistryConfigure struct {
	Registries map[string]*ContainerdRegistry `json:"registries,omitempty"`
	ConfigDir  string                         `json:"configDir"`
}

func (*ContainerdRegistryConfigure) Install added in v1.3.1

func (*ContainerdRegistryConfigure) NewInstance added in v1.3.1

func (*ContainerdRegistryConfigure) Uninstall added in v1.3.1

type ContainerdRunnable

type ContainerdRunnable struct {
	Base
	RegistryConfigDir string `json:"registryConfigDir"`
	LocalRegistry     string `json:"localRegistry"`
	KubeVersion       string `json:"kubeVersion"`
	PauseVersion      string `json:"pauseVersion"`
	PauseRegistry     string `json:"pauseRegistry"`
	// contains filtered or unexported fields
}

func (*ContainerdRunnable) GetActionSteps

func (runnable *ContainerdRunnable) GetActionSteps(action v1.StepAction) []v1.Step

func (*ContainerdRunnable) InitStep

func (runnable *ContainerdRunnable) InitStep(ctx context.Context, cluster *v1.Cluster, nodes []v1.StepNode) error

func (ContainerdRunnable) Install

func (runnable ContainerdRunnable) Install(ctx context.Context, opts component.Options) ([]byte, error)

func (*ContainerdRunnable) NewInstance

func (runnable *ContainerdRunnable) NewInstance() component.ObjectMeta

func (*ContainerdRunnable) OfflineUpgrade

func (runnable *ContainerdRunnable) OfflineUpgrade(ctx context.Context, dryRun bool) ([]byte, error)

func (*ContainerdRunnable) OnlineUpgrade

func (runnable *ContainerdRunnable) OnlineUpgrade(ctx context.Context, dryRun bool) ([]byte, error)

func (ContainerdRunnable) Uninstall

func (runnable ContainerdRunnable) Uninstall(ctx context.Context, opts component.Options) ([]byte, error)

type DockerInsecureRegistryConfigure added in v1.3.1

type DockerInsecureRegistryConfigure struct {
	InsecureRegistry []string `json:"insecureRegistry,omitempty"`
}

func (*DockerInsecureRegistryConfigure) Install added in v1.3.1

func (*DockerInsecureRegistryConfigure) NewInstance added in v1.3.1

func (*DockerInsecureRegistryConfigure) Uninstall added in v1.3.1

type DockerRunnable

type DockerRunnable struct {
	Base
	InsecureRegistry []string `json:"insecureRegistry,omitempty"`
	// contains filtered or unexported fields
}

func (*DockerRunnable) GetActionSteps

func (runnable *DockerRunnable) GetActionSteps(action v1.StepAction) []v1.Step

func (*DockerRunnable) InitStep

func (runnable *DockerRunnable) InitStep(ctx context.Context, cluster *v1.Cluster, nodes []v1.StepNode) error

func (DockerRunnable) Install

func (runnable DockerRunnable) Install(ctx context.Context, opts component.Options) ([]byte, error)

func (*DockerRunnable) NewInstance

func (runnable *DockerRunnable) NewInstance() component.ObjectMeta

func (*DockerRunnable) OfflineUpgrade

func (runnable *DockerRunnable) OfflineUpgrade(ctx context.Context, dryRun bool) ([]byte, error)

func (*DockerRunnable) OnlineUpgrade

func (runnable *DockerRunnable) OnlineUpgrade(ctx context.Context, dryRun bool) ([]byte, error)

func (DockerRunnable) Uninstall

func (runnable DockerRunnable) Uninstall(ctx context.Context, opts component.Options) ([]byte, error)

type HostFile added in v1.1.1

type HostFile struct {
	// Server specifies the default server. When `host` is
	// also specified, those hosts are tried first.
	Server string `toml:"server"`
	// HostConfigs store the per-host configuration
	HostConfigs map[string]HostFileConfig `toml:"host"`
}

type HostFileConfig added in v1.1.1

type HostFileConfig struct {
	// Capabilities determine what operations a host is
	// capable of performing. Allowed values
	//  - pull
	//  - resolve
	//  - push
	Capabilities []string `toml:"capabilities,omitempty"`

	// CACert are the public key certificates for TLS
	// Accepted types
	// - string - Single file with certificate(s)
	// - []string - Multiple files with certificates
	CACert interface{} `toml:"ca,omitempty,omitempty"`

	// Client keypair(s) for TLS with client authentication
	// Accepted types
	// - string - Single file with public and private keys
	// - []string - Multiple files with public and private keys
	// - [][2]string - Multiple keypairs with public and private keys in separate files
	Client interface{} `toml:"client,omitempty"`

	// SkipVerify skips verification of the server's certificate chain
	// and host name. This should only be used for testing or in
	// combination with other methods of verifying connections.
	SkipVerify *bool `toml:"skip_verify,omitempty"`

	// Header are additional header files to send to the server
	Header map[string]interface{} `toml:"header,omitempty"`

	// OverridePath indicates the API root endpoint is defined in the URL
	// path rather than by the API specification.
	// This may be used with non-compliant OCI registries to override the
	// API root endpoint.
	OverridePath bool `toml:"override_path,omitempty"`
}

Jump to

Keyboard shortcuts

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