localkube

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package localkube manages local Kubernetes clusters for development use.

It wraps the Kind backend (sigs.k8s.io/kind) and supports Docker, Podman (daemonless, rootless), and nerdctl as host container engines. The active backend is selected at construction time via WithBackend; the default is BackendKind. Future backends can be added as additional Backend constants without breaking callers.

Basic usage

m, err := localkube.New()
if err != nil { ... }
defer m.Close()

if err := m.Create(ctx, "dev"); err != nil { ... }
defer m.Delete(ctx, "dev", localkube.WithIgnoreMissing())

kc, err := m.KubeConfig(ctx, "dev")
_ = kc.Path() // stable path on disk

Image loading

Two methods are available:

Cloud provider (LoadBalancer, Ingress, Gateway API)

The optional cloud provider runs the cloud-provider-kind image as a managed container via the gopherly.dev/currus engine abstraction. This avoids in-process global state mutation and works without elevated privileges on Linux.

m, _ := localkube.New()
defer m.Close()

// Non-blocking: start in background, stop when done.
if err := m.StartCloudProvider(ctx); err != nil { ... }
defer m.StopCloudProvider(ctx)
running := m.CloudProviderRunning(ctx)

// Foreground: blocks until ctx is canceled, then stops the container.
// Logs go to os.Stderr by default; pass WithAttachWriter to redirect them.
ctx, stop := signal.NotifyContext(ctx, os.Interrupt)
defer stop()
_ = m.AttachCloudProvider(ctx) // logs to os.Stderr
_ = m.AttachCloudProvider(ctx, localkube.WithAttachWriter(w))

Docker and Podman are fully supported. Returns ErrUnsupported for nerdctl/finch (cluster create/delete/kubeconfig still work on all engines).

Concurrency

Manager is safe for concurrent use. Its config is immutable after New. Manager.StartCloudProvider and Manager.StopCloudProvider are idempotent: calling Start while the container is already running is a no-op, and Stop when no container exists is also a no-op.

Cancellation

Kind's Go API does not accept a context.Context. When a context passed to Manager.Create is canceled:

  • Create returns immediately with ctx.Err().
  • Unless WithRetainOnFailure is set, a background goroutine waits for Kind to finish and then deletes the partial cluster.
  • Call Manager.Close to wait for the goroutine to finish before exit.

File-on-disk side effects

Create writes to one deployah-managed location:

  1. Kubeconfig copy under XDG StateHome at deployah/localkube/kubeconfigs/<name>.yaml: written by Manager.KubeConfig, accessible via KubeConfig.Path.

Kind itself writes to two additional locations:

  1. User's ~/.kube/config: Kind merges a "kind-<name>" context on Create and removes it on Delete.

  2. Container labels on Kind's node containers: visible to "kind get clusters" and "docker ps". Kind is the single source of truth for cluster existence.

Index

Examples

Constants

View Source
const (

	// DefaultIngressIP is the host IP at which the Ingress controller is
	// reachable after cloud-provider-kind maps LoadBalancer ports to the host
	// (via --enable-lb-port-mapping). It matches the default PortMapping
	// ListenAddress used by Kind's extraPortMappings.
	DefaultIngressIP = "127.0.0.1"
)

Variables

View Source
var (
	// ErrNotFound is returned when a named cluster does not exist.
	ErrNotFound = errors.New("cluster not found")
	// ErrAlreadyExists is returned when Create targets a name already in use.
	ErrAlreadyExists = errors.New("cluster already exists")
	// ErrUnsupported is returned when the active backend does not support
	// the requested operation.
	ErrUnsupported = errors.New("operation not supported by this backend")
	// ErrInvalidName is returned when a cluster name is not a safe filesystem
	// component (empty, contains path separators, starts with "..", etc.).
	ErrInvalidName = errors.New("invalid cluster name")
)

Sentinel errors returned by Manager methods.

Functions

func DefaultKubeconfigPath

func DefaultKubeconfigPath(name string) (string, error)

DefaultKubeconfigPath returns the path where deployah stores the kubeconfig for the named cluster, using the default XDG state directory. The file may not exist yet; no I/O is performed.

Types

type Backend

type Backend string

Backend identifies the cluster provisioning backend.

const (
	// BackendKind uses sigs.k8s.io/kind as the cluster backend.
	BackendKind Backend = "kind"
)

type CloudProviderOption

type CloudProviderOption func(*cloudProviderConfig)

CloudProviderOption configures the cloud-provider-kind container started by Manager.StartCloudProvider or Manager.AttachCloudProvider.

func WithAttachWriter

func WithAttachWriter(w io.Writer) CloudProviderOption

WithAttachWriter sets the io.Writer that Manager.AttachCloudProvider streams container logs to. Defaults to os.Stderr when not set.

func WithCloudProviderImage

func WithCloudProviderImage(image string) CloudProviderOption

WithCloudProviderImage overrides the cloud-provider-kind container image. Use this to pin a specific version or test a local build.

func WithCloudProviderSocket

func WithCloudProviderSocket(socketPath string) CloudProviderOption

WithCloudProviderSocket overrides the host engine socket bind-mounted into the cloud-provider container. When empty, the socket is derived from the currus engine endpoint (unix:// path). Set this when the engine listens on a non-standard socket path.

func WithClusterName

func WithClusterName(name string) CloudProviderOption

WithClusterName sets the Kind cluster name so that Manager.StopCloudProvider also removes gateway sidecar containers spawned by cloud-provider-kind.

func WithGatewayAPI

func WithGatewayAPI(ch GatewayChannel) CloudProviderOption

WithGatewayAPI selects the Gateway API release channel for cloud-provider-kind. Default: GatewayStandard.

func WithIngressDefault

func WithIngressDefault(enabled bool) CloudProviderOption

WithIngressDefault toggles cloud-provider-kind's default ingress class. Default: true.

type Cluster

type Cluster struct {
	// Name is the cluster name passed to Create.
	Name string
	// Backend identifies the provider; currently always "kind".
	Backend string
	// Runtime is the host container engine used for cluster nodes.
	Runtime Runtime
	// Nodes is the total node count (control-plane + workers).
	Nodes int
	// Roles counts nodes by role (e.g. "control-plane": 1, "worker": 2).
	// May be nil or incomplete if the backend cannot determine roles.
	Roles map[string]int
	// CreatedAt is the time the first node container was started.
	// May be zero if the backend cannot determine it.
	CreatedAt time.Time
}

Cluster holds metadata about a local cluster managed via localkube.

type CreateOption

type CreateOption func(*createConfig)

CreateOption configures a single Manager.Create call.

func WithCreateEventHandler

func WithCreateEventHandler(fn func(Event)) CreateOption

WithCreateEventHandler overrides the manager-level event handler for this Create call only.

func WithCreateIfMissing

func WithCreateIfMissing() CreateOption

WithCreateIfMissing makes Create a no-op (returning nil) when a cluster with the same name already exists, instead of returning ErrAlreadyExists.

func WithKindConfig

func WithKindConfig(raw []byte) CreateOption

WithKindConfig supplies a raw Kind cluster config YAML. When set, it takes priority over WithPortMappings. A warning is logged if both are provided.

func WithPortMappings

func WithPortMappings(pms ...PortMapping) CreateOption

WithPortMappings adds host-to-container port mappings to the cluster nodes. Ignored if WithKindConfig is also set (raw config takes priority).

func WithRetainOnFailure

func WithRetainOnFailure(retain bool) CreateOption

WithRetainOnFailure keeps the partially-created cluster when Create fails or is canceled. Useful for post-mortem debugging.

func WithWaitTimeout

func WithWaitTimeout(d time.Duration) CreateOption

WithWaitTimeout sets how long Create waits for cluster nodes to become Ready. Defaults to [defaultCreateWaitReady].

type DeleteOption

type DeleteOption func(*deleteConfig)

DeleteOption configures a single Manager.Delete call.

func WithDeleteEventHandler

func WithDeleteEventHandler(fn func(Event)) DeleteOption

WithDeleteEventHandler overrides the manager-level event handler for this Delete call only, analogous to WithCreateEventHandler.

func WithIgnoreMissing

func WithIgnoreMissing() DeleteOption

WithIgnoreMissing makes Delete return nil when the named cluster does not exist, instead of returning ErrNotFound.

type Event

type Event struct {
	// Step is one of the Step* constants.
	Step Step
	// Status indicates whether the step has started, completed, or failed.
	Status StepStatus
	// Detail carries optional free-form context (e.g. the image ref or error message).
	Detail string
	// Err is the underlying error that caused a StepFailed event, or nil.
	// Always nil for StepStarted and StepCompleted events.
	Err error
}

Event is emitted during long-running operations to report progress.

Err is set on StepFailed events and can be inspected with errors.Is or errors.As. Existing subscribers that only inspect Detail are unaffected.

type EventFunc

type EventFunc func(Event)

EventFunc is a callback invoked with progress events.

type GatewayChannel

type GatewayChannel string

GatewayChannel selects which Gateway API CRDs cloud-provider-kind installs.

const (
	// GatewayStandard installs the stable Gateway API CRDs (default).
	GatewayStandard GatewayChannel = "standard"
	// GatewayExperimental installs the experimental Gateway API CRDs.
	GatewayExperimental GatewayChannel = "experimental"
	// GatewayDisabled skips Gateway API CRD installation entirely.
	GatewayDisabled GatewayChannel = "disabled"
)

type KubeConfig

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

KubeConfig is an immutable value returned by Manager.KubeConfig. All I/O (fetching from Kind and writing to disk) is done inside Manager.KubeConfig; the accessors on this type are side-effect-free.

func (*KubeConfig) Bytes

func (kc *KubeConfig) Bytes() []byte

Bytes returns a copy of the raw kubeconfig YAML bytes. Callers may freely modify the returned slice without affecting this value.

func (*KubeConfig) Path

func (kc *KubeConfig) Path() string

Path returns the path of the kubeconfig file written by Manager.KubeConfig. The file is guaranteed to exist when this method is called.

func (*KubeConfig) WriteTo

func (kc *KubeConfig) WriteTo(w io.Writer) (int64, error)

WriteTo implements io.WriterTo. It writes the kubeconfig YAML to w.

type Manager

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

Manager manages local Kubernetes clusters. It is safe for concurrent use.

func New

func New(opts ...Option) (*Manager, error)

New creates a Manager with the given options.

Example:

m, err := localkube.New(localkube.WithRuntime(localkube.RuntimePodman))
Example

ExampleNew constructs a Manager with runtime and Kubernetes version options.

package main

import (
	"fmt"
	"log"

	"deployah.dev/deployah/internal/localkube"
)

func main() {
	m, err := localkube.New(
		localkube.WithRuntime(localkube.RuntimePodman),
		localkube.WithKubernetesVersion("1.31"),
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(m != nil)
}
Output:
true

func (*Manager) AttachCloudProvider

func (m *Manager) AttachCloudProvider(ctx context.Context, opts ...CloudProviderOption) error

AttachCloudProvider starts the cloud-provider-kind container (if not already running) and streams its logs until ctx is canceled, then stops the container.

By default logs are written to os.Stderr. Use WithAttachWriter to redirect them to any io.Writer.

Use this for the foreground "deployah cluster up --attach" workflow.

Example:

ctx, stop := signal.NotifyContext(ctx, os.Interrupt)
defer stop()
_ = m.AttachCloudProvider(ctx)

Redirect logs to a file:

_ = m.AttachCloudProvider(ctx, localkube.WithAttachWriter(logFile))

func (*Manager) Close

func (m *Manager) Close() error

Close waits for all background goroutines to finish and releases the currus engine connection. It is safe to call multiple times.

Example:

m, _ := localkube.New()
defer m.Close()

func (*Manager) CloudProviderRunning

func (m *Manager) CloudProviderRunning(ctx context.Context) bool

CloudProviderRunning reports whether the cloud-provider-kind container is currently running. Returns false when no container is found or the engine is unavailable.

func (*Manager) ContextName

func (m *Manager) ContextName(name string) string

ContextName returns the Kubernetes context name for a cluster. Pure helper: performs no I/O.

func (*Manager) Create

func (m *Manager) Create(ctx context.Context, name string, opts ...CreateOption) error

Create provisions a new cluster with the given name.

Kind merges a "kind-<name>" context into ~/.kube/config on creation. A progress callback can be installed with WithCreateEventHandler.

If the context is canceled, Create returns ctx.Err() immediately. Unless WithRetainOnFailure is set, a background goroutine waits for the Kind operation to finish and then deletes the partial cluster. The goroutine is tracked in Manager.wg; call Manager.Close to wait for it to finish.

Example

ExampleManager_Create shows create options and the progress event shape. A live cluster is required to run Manager.Create itself.

package main

import (
	"fmt"

	"deployah.dev/deployah/internal/localkube"
)

func main() {
	handler := func(e localkube.Event) {
		fmt.Printf("step=%s status=%d\n", e.Step, e.Status)
	}
	handler(localkube.Event{Step: localkube.StepCreating, Status: localkube.StepStarted})

	_ = []localkube.CreateOption{
		localkube.WithPortMappings(localkube.PortMapping{HostPort: 8080, ContainerPort: 80}),
		localkube.WithCreateEventHandler(handler),
	}
}
Output:
step=creating status=0

func (*Manager) Delete

func (m *Manager) Delete(ctx context.Context, name string, opts ...DeleteOption) error

Delete removes the named cluster.

Returns ErrNotFound when the cluster does not exist, unless WithIgnoreMissing is passed.

func (*Manager) GatewayPorts added in v0.1.9

func (m *Manager) GatewayPorts(ctx context.Context, clusterName string) map[uint16]uint16

GatewayPorts returns the published host ports from the envoy gateway containers spawned by cloud-provider-kind for the named cluster. The map keys are container ports (e.g. 80); the values are the corresponding host ports assigned by Docker (e.g. 32769). Returns nil when no gateway containers are running or the engine is unavailable.

func (*Manager) Get

func (m *Manager) Get(ctx context.Context, name string) (*Cluster, error)

Get returns the metadata for a cluster. Kind is the source of truth; the cluster does not need to have been created via localkube. Returns ErrNotFound if Kind does not know about this cluster.

func (*Manager) KubeConfig

func (m *Manager) KubeConfig(ctx context.Context, name string) (*KubeConfig, error)

KubeConfig fetches the kubeconfig for a cluster, writes it atomically to the deployah kubeconfig directory, and returns an immutable KubeConfig value.

The returned KubeConfig.Path() is guaranteed to exist on disk.

Example

ExampleManager_KubeConfig shows where Manager.KubeConfig writes the file. A live cluster is required to fetch kubeconfig bytes.

package main

import (
	"fmt"
	"log"

	"deployah.dev/deployah/internal/localkube"
)

func main() {
	path, err := localkube.DefaultKubeconfigPath("dev")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("path ok: %v\n", len(path) > 0)
}
Output:
path ok: true

func (*Manager) List

func (m *Manager) List(ctx context.Context) ([]*Cluster, error)

List returns all clusters known to the backend, sorted by name.

Kind is the source of truth; any cluster created outside localkube is also returned. Results are sorted by cluster name.

func (*Manager) LoadImage

func (m *Manager) LoadImage(ctx context.Context, clusterName, imageRef string) error

LoadImage resolves an image reference, fetches it (from local daemon, registry, or file), and loads it into the named cluster.

Resolution order: file path → local daemon → remote registry. For low-level loading from an existing reader, use Manager.LoadImageArchive.

Example

ExampleManager_LoadImage shows the resolving-image event emitted during load. A live cluster is required to run Manager.LoadImage itself.

package main

import (
	"fmt"

	"deployah.dev/deployah/internal/localkube"
)

func main() {
	e := localkube.Event{
		Step:   localkube.StepResolvingImage,
		Status: localkube.StepStarted,
		Detail: "myapp:latest",
	}
	fmt.Printf("step=%s status=%d ref=%s\n", e.Step, e.Status, e.Detail)
}
Output:
step=resolving-image status=0 ref=myapp:latest

func (*Manager) LoadImageArchive

func (m *Manager) LoadImageArchive(ctx context.Context, clusterName string, archive io.Reader) error

LoadImageArchive loads a Docker/OCI tar archive into the named cluster. The archive is read until EOF; the caller is responsible for closing it.

Example

ExampleManager_LoadImageArchive opens a tar archive for loading. A live cluster is required to run Manager.LoadImageArchive itself.

package main

import (
	"fmt"
	"log"
	"os"
)

func main() {
	f, err := os.CreateTemp("", "example-*.tar")
	if err != nil {
		log.Fatal(err)
	}
	defer func() {
		if closeErr := f.Close(); closeErr != nil {
			log.Print(closeErr)
		}
		if rmErr := os.Remove(f.Name()); rmErr != nil {
			log.Print(rmErr)
		}
	}()

	fmt.Printf("opened archive: %v\n", f != nil)
}
Output:
opened archive: true

func (*Manager) Recreate

func (m *Manager) Recreate(ctx context.Context, name string, opts ...CreateOption) error

Recreate deletes an existing cluster (if any) and creates a fresh one.

func (*Manager) StartCloudProvider

func (m *Manager) StartCloudProvider(ctx context.Context, opts ...CloudProviderOption) error

StartCloudProvider starts the cloud-provider-kind container, enabling LoadBalancer, Ingress, and Gateway API in local Kind clusters.

It is idempotent: calling it when the container is already running returns nil. Returns ErrUnsupported when no Docker or Podman engine is available (e.g. when the cluster is running via nerdctl or finch).

Example:

if err := m.StartCloudProvider(ctx); err != nil { ... }
defer m.StopCloudProvider(ctx)

func (*Manager) Status

func (m *Manager) Status(ctx context.Context, name string) (Status, error)

Status returns the runtime health of a named cluster. A non-nil error indicates the status could not be determined; the Status value is still set to a best-effort estimate (e.g. StatusStopped).

func (*Manager) StopCloudProvider

func (m *Manager) StopCloudProvider(ctx context.Context, opts ...CloudProviderOption) error

StopCloudProvider removes the cloud-provider-kind container and any gateway sidecar containers it spawned.

Pass WithClusterName to also remove gateway envoy proxies created by cloud-provider-kind for the given cluster. It is idempotent: calling it when no container is running returns nil.

func (*Manager) SyncRegistryAuth added in v0.1.9

func (m *Manager) SyncRegistryAuth(ctx context.Context, name, namespace string) error

SyncRegistryAuth reads the host's container registry credentials via the currus.CredentialProvider capability and writes them as a Kubernetes dockerconfigjson [Secret] named "deployah-registry-auth" into the given namespace of the named cluster. It also patches the "default" ServiceAccount in that namespace to reference the Secret via imagePullSecrets, so that all pods pull private images automatically.

SyncRegistryAuth is idempotent: calling it multiple times is safe and always overwrites the Secret with the freshest credentials (short-lived tokens from credential helpers are refreshed on each call).

The call is a no-op (returns nil) when:

  • no Docker or Podman engine was found at Manager construction time
  • the engine does not implement currus.CredentialProvider
  • the host has no stored credentials

Example:

if err := m.SyncRegistryAuth(ctx, clusterName, "default"); err != nil {
    log.Warn("registry auth sync failed", "err", err)
}

type Option

type Option func(*config)

Option configures a Manager at construction time via New.

func WithBackend

func WithBackend(b Backend) Option

WithBackend selects the cluster provisioning backend. Currently only BackendKind is supported. This option exists so callers can express intent explicitly and the API can accommodate future backends without a breaking change.

func WithEventHandler

func WithEventHandler(fn func(Event)) Option

WithEventHandler registers a manager-level event callback. Individual Create calls may override this with their own handler via WithCreateEventHandler.

func WithKubeconfigDir

func WithKubeconfigDir(dir string) Option

WithKubeconfigDir overrides the default XDG-based directory used for kubeconfig copies written by Manager.KubeConfig. Intended for testing; production code should rely on the default.

func WithKubernetesVersion

func WithKubernetesVersion(v string) Option

WithKubernetesVersion pins the Kubernetes version for new clusters (e.g. "1.31" or "v1.31.2"). The Kind provider maps this to the corresponding kindest/node image tag.

func WithLogger

func WithLogger(l *slog.Logger) Option

WithLogger sets the logger used by the Manager and its underlying provider. Passing nil silently discards all log output.

func WithRuntime

func WithRuntime(r Runtime) Option

WithRuntime forces a specific host container engine. Defaults to RuntimeAuto which lets Kind detect the available engine.

func WithSpoolDir

func WithSpoolDir(dir string) Option

WithSpoolDir overrides the directory used for temporary image-archive files during Manager.LoadImage and Manager.LoadImageArchive. When empty (the default), os.TempDir() is used, which on many Linux systems (including NixOS) is backed by tmpfs/RAM. For large images, set TMPDIR or use this option to point at a persistent, disk-backed directory.

func WithTimeout

func WithTimeout(d time.Duration) Option

WithTimeout sets the per-method operation budget. Methods called with a context that already has a deadline respect that deadline instead.

type PortMapping

type PortMapping struct {
	// HostPort is the port exposed on the host machine.
	HostPort uint16
	// ContainerPort is the port inside the node container.
	ContainerPort uint16
	// Protocol is [ProtocolTCP] (default) or [ProtocolUDP].
	Protocol Protocol
	// ListenAddress defaults to 127.0.0.1 when empty.
	ListenAddress string
}

PortMapping maps a host port to a container port on a cluster node.

type Protocol

type Protocol string

Protocol identifies the transport-layer protocol for a port mapping.

const (
	// ProtocolTCP selects TCP as the port mapping protocol. This is the default
	// when Protocol is omitted from a [PortMapping].
	ProtocolTCP Protocol = "TCP"
	// ProtocolUDP selects UDP as the port mapping protocol.
	ProtocolUDP Protocol = "UDP"
)

type Runtime

type Runtime int

Runtime identifies the host container engine used to run cluster node containers.

const (
	// RuntimeAuto lets Kind detect the available engine automatically.
	RuntimeAuto Runtime = iota
	// RuntimeDocker forces Docker as the host container engine.
	RuntimeDocker
	// RuntimePodman forces Podman — daemonless and rootless.
	RuntimePodman
	// RuntimeNerdctl forces nerdctl as the host container engine.
	RuntimeNerdctl
)

func (Runtime) String

func (r Runtime) String() string

String returns the runtime name ("auto", "docker", "podman", or "nerdctl").

type Status

type Status int

Status reports the runtime health of a cluster.

const (
	// StatusUnknown means the cluster state could not be determined.
	StatusUnknown Status = iota
	// StatusRunning means the API server is reachable and all nodes are Ready.
	StatusRunning
	// StatusStopped means node containers exist but are not running.
	StatusStopped
	// StatusUnhealthy means the cluster exists but the API server is
	// unreachable or one or more nodes are NotReady.
	StatusUnhealthy
)

func (Status) String

func (s Status) String() string

String returns the status name ("unknown", "running", "stopped", or "unhealthy").

type Step

type Step string

Step is a stable identifier for a named stage in a long-running operation. Callers may safely switch on Step values; the closed constant set below is the complete list. Any value not in the list should be treated as unknown.

const (
	// StepCreating is emitted by Manager.Create during cluster provisioning.
	StepCreating Step = "creating"
	// StepDeleting is emitted by Manager.Delete during cluster removal.
	StepDeleting Step = "deleting"
	// StepWritingKubeconfig is emitted by Manager.KubeConfig.
	StepWritingKubeconfig Step = "writing-kubeconfig"
	// StepLoadingImage is emitted by Manager.LoadImage / Manager.LoadImageArchive.
	StepLoadingImage Step = "loading-image"
	// StepResolvingImage is emitted during image reference resolution.
	StepResolvingImage Step = "resolving-image"

	// StepStartingCloudProvider is emitted by Manager.StartCloudProvider.
	StepStartingCloudProvider Step = "starting-cloud-provider"
	// StepStoppingCloudProvider is emitted by Manager.StopCloudProvider.
	StepStoppingCloudProvider Step = "stopping-cloud-provider"

	// StepPullingNodeImage is emitted by Kind while pulling the node container image.
	StepPullingNodeImage       Step = "pulling-node-image"
	StepPreparingNodes         Step = "preparing-nodes"
	StepWritingConfiguration   Step = "writing-configuration"
	StepStartingControlPlane   Step = "starting-control-plane"
	StepInstallingCNI          Step = "installing-cni"
	StepInstallingStorageClass Step = "installing-storage-class"
	StepJoiningControlPlane    Step = "joining-control-plane"
	StepJoiningWorkers         Step = "joining-workers"
	StepWaitingForReady        Step = "waiting-for-ready"
)

Step constants for Manager lifecycle operations.

type StepStatus

type StepStatus int

StepStatus tracks where an operation is in its lifecycle.

const (
	// StepStarted is emitted when a step begins.
	StepStarted StepStatus = iota
	// StepCompleted is emitted when a step finishes successfully.
	StepCompleted
	// StepFailed is emitted when a step fails.
	StepFailed
)

Directories

Path Synopsis
Package cloudprovider manages the cloud-provider-kind sidecar container that enables LoadBalancer, Ingress, and Gateway API in local Kind clusters.
Package cloudprovider manages the cloud-provider-kind sidecar container that enables LoadBalancer, Ingress, and Gateway API in local Kind clusters.
Package imageref resolves an image reference to an io.ReadCloser of the image's Docker/OCI tar archive.
Package imageref resolves an image reference to an io.ReadCloser of the image's Docker/OCI tar archive.

Jump to

Keyboard shortcuts

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