containerruntime

package
v0.0.0-...-7b24307 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultContainerdVersion = "1.6*"
)

Variables

This section is empty.

Functions

func GetContainerdAuthConfig

func GetContainerdAuthConfig(ctx context.Context, client ctrlruntimeclient.Client, registryCredentialsSecret string) (map[string]AuthConfig, error)

Types

type AuthConfig

type AuthConfig struct {
	// Username is the username to login the registry.
	Username string `toml:"username,omitempty" json:"username,omitempty"`
	// Password is the password to login the registry.
	Password string `toml:"password,omitempty" json:"password,omitempty"`
	// Auth is a base64 encoded string from the concatenation of the username,
	// a colon, and the password.
	Auth string `toml:"auth,omitempty" json:"auth,omitempty"`
	// IdentityToken is used to authenticate the user and get
	// an access token for the registry.
	IdentityToken string `toml:"identitytoken,omitempty" json:"identitytoken,omitempty"`
}

AuthConfig is a COPY of github.com/containerd/containerd/pkg/cri/config.AuthConfig. AuthConfig contains the config related to authentication to a specific registry.

type Config

type Config struct {
	Containerd           *Containerd           `json:",omitempty"`
	InsecureRegistries   []string              `json:",omitempty"`
	RegistryMirrors      map[string][]string   `json:",omitempty"`
	RegistryCredentials  map[string]AuthConfig `json:",omitempty"`
	SandboxImage         string                `json:",omitempty"`
	ContainerLogMaxFiles string                `json:",omitempty"`
	ContainerLogMaxSize  string                `json:",omitempty"`
	ContainerdVersion    string                `json:",omitempty"`
}

func BuildConfig

func BuildConfig(opts Opts) (Config, error)

func (Config) Engine

func (cfg Config) Engine() Engine

func (Config) String

func (cfg Config) String() string

type Containerd

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

func (*Containerd) AuthConfig

func (eng *Containerd) AuthConfig() (string, error)

func (*Containerd) AuthConfigFileName

func (eng *Containerd) AuthConfigFileName() string

func (*Containerd) Config

func (eng *Containerd) Config() (string, error)

func (*Containerd) ConfigFileName

func (eng *Containerd) ConfigFileName() string

func (*Containerd) KubeletFlags

func (eng *Containerd) KubeletFlags() []string

func (*Containerd) ScriptFor

func (eng *Containerd) ScriptFor(os types.OperatingSystem) (string, error)

func (*Containerd) String

func (eng *Containerd) String() string

type DockerCfgJSON

type DockerCfgJSON struct {
	Auths map[string]AuthConfig `json:"auths,omitempty"`
}

type Engine

type Engine interface {
	KubeletFlags() []string
	ScriptFor(os types.OperatingSystem) (string, error)
	ConfigFileName() string
	Config() (string, error)
	AuthConfigFileName() string
	AuthConfig() (string, error)
	String() string
}

type Opt

type Opt func(*Config)

type Opts

type Opts struct {
	ContainerRuntime          string
	ContainerdVersion         string
	InsecureRegistries        string
	RegistryMirrors           string
	RegistryCredentialsSecret string
	PauseImage                string
	ContainerdRegistryMirrors RegistryMirrorsFlags
}

type RegistryMirrorsFlags

type RegistryMirrorsFlags map[string][]string

func (RegistryMirrorsFlags) Set

func (fl RegistryMirrorsFlags) Set(val string) error

func (RegistryMirrorsFlags) String

func (fl RegistryMirrorsFlags) String() string

Jump to

Keyboard shortcuts

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