Documentation ¶
Index ¶
- func New(opts ...Option) (*k3s, error)
- type Hooks
- type MirrorConfig
- type Option
- func WithAuthFromKeychain(registry string) Option
- func WithAuthFromStatic(registry, username, password, auth string) Option
- func WithCniDisabled(disabled bool) Option
- func WithHooks(hooks Hooks) Option
- func WithImageRef(ref name.Reference) Option
- func WithKubeletConfig(kubeletConfig string) Option
- func WithMetricsServerDisabled(disabled bool) Option
- func WithName(name string) Option
- func WithNetworkPolicyDisabled(disabled bool) Option
- func WithNetworks(networks ...docker.NetworkAttachment) Option
- func WithRegistryMirror(registry string, endpoints ...string) Option
- func WithResources(req docker.ResourcesRequest) Option
- func WithSandboxEnv(envs ...string) Option
- func WithSandboxImageRef(ref name.Reference) Option
- func WithSandboxMounts(mounts ...mount.Mount) Option
- func WithSandboxName(name string) Option
- func WithSandboxResources(req docker.ResourcesRequest) Option
- func WithSnapshotter(snapshotter Snapshotter) Option
- func WithTraefikDisabled(disabled bool) Option
- type RegistryAuthConfig
- type RegistryConfig
- type RegistryTlsConfig
- type Snapshotter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hooks ¶
type Hooks struct { // PreStart is a list of commands to run after the k3s container successfully // starts (the api server is available). PostStart []string }
Hooks are the hooks that can be run at various stages of the k3s lifecycle.
type MirrorConfig ¶
type MirrorConfig struct {
Endpoints []string
}
type Option ¶
type Option func(*k3s) error
func WithAuthFromKeychain ¶
func WithAuthFromStatic ¶
func WithCniDisabled ¶
WithCniDisabled disables the CNI plugin.
func WithImageRef ¶
func WithKubeletConfig ¶
func WithMetricsServerDisabled ¶
WithMetricsServerDisabled disables the metrics server.
func WithNetworks ¶
func WithNetworks(networks ...docker.NetworkAttachment) Option
func WithRegistryMirror ¶
func WithResources ¶
func WithResources(req docker.ResourcesRequest) Option
func WithSandboxEnv ¶
func WithSandboxImageRef ¶
func WithSandboxMounts ¶
func WithSandboxName ¶
func WithSandboxResources ¶
func WithSandboxResources(req docker.ResourcesRequest) Option
func WithSnapshotter ¶
func WithSnapshotter(snapshotter Snapshotter) Option
func WithTraefikDisabled ¶
WithTraefikDisabled disables the traefik ingress controller.
type RegistryAuthConfig ¶
type RegistryConfig ¶
type RegistryConfig struct { Auth *RegistryAuthConfig Tls *RegistryTlsConfig }
type RegistryTlsConfig ¶
type Snapshotter ¶
type Snapshotter string
const ( K3sContainerSnapshotterNative Snapshotter = "native" K3sContainerSnapshotterOverlayfs Snapshotter = "overlayfs" )
Click to show internal directories.
Click to hide internal directories.