v1beta1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatePendingStr  = "Pending"
	StateReadyStr    = "Ready"
	StateStoppedStr  = "Stopped"
	StatePausedStr   = "Paused"
	StatePausingStr  = "Pausing"
	StateFailedStr   = "Failed"
	StateUnknownStr  = "Unknown"
	StateCreatingStr = "Creating"
	StateDeletingStr = "Deleting"
)

Common printable state strings.

Variables

This section is empty.

Functions

This section is empty.

Types

type CellDoc

type CellDoc struct {
	APIVersion Version      `json:"apiVersion" yaml:"apiVersion"`
	Kind       Kind         `json:"kind"       yaml:"kind"`
	Metadata   CellMetadata `json:"metadata"   yaml:"metadata"`
	Spec       CellSpec     `json:"spec"       yaml:"spec"`
	Status     CellStatus   `json:"status"     yaml:"status"`
}

func NewCellDoc

func NewCellDoc(from *CellDoc) *CellDoc

NewCellDoc creates a CellDoc ensuring all nested structs are initialized.

type CellMetadata

type CellMetadata struct {
	Name   string            `json:"name"   yaml:"name"`
	Labels map[string]string `json:"labels" yaml:"labels"`
}

type CellNetworkStatus added in v0.3.0

type CellNetworkStatus struct {
	BridgeName string `json:"bridgeName,omitempty" yaml:"bridgeName,omitempty"`
}

CellNetworkStatus exposes the host-side bridge a cell is attached to. Populated by the runner during cell provisioning so describe/get -o yaml surfaces the iface name without recomputing the hash. Always emitted in the canonical k-{8hex} form (see cni.SafeBridgeName).

type CellProfileDoc added in v0.3.0

type CellProfileDoc struct {
	APIVersion Version             `json:"apiVersion" yaml:"apiVersion"`
	Kind       Kind                `json:"kind"       yaml:"kind"`
	Metadata   CellProfileMetadata `json:"metadata"   yaml:"metadata"`
	Spec       CellProfileSpec     `json:"spec"       yaml:"spec"`
}

CellProfileDoc is a per-user reusable cell template loaded from $HOME/.kuke/profiles.d/<name>.yaml (or $KUKE_PROFILES_DIR). It is never sent to the daemon: `kuke run -p` materializes a CellDoc from it locally and proceeds along the same `-f` path.

type CellProfileMetadata added in v0.3.0

type CellProfileMetadata struct {
	Name   string            `json:"name"             yaml:"name"`
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
}

type CellProfileSpec added in v0.3.0

type CellProfileSpec struct {
	Realm  string   `json:"realm,omitempty"  yaml:"realm,omitempty"`
	Space  string   `json:"space,omitempty"  yaml:"space,omitempty"`
	Stack  string   `json:"stack,omitempty"  yaml:"stack,omitempty"`
	Prefix string   `json:"prefix,omitempty" yaml:"prefix,omitempty"`
	Cell   CellSpec `json:"cell"             yaml:"cell"`
}

CellProfileSpec carries the location triple (realm/space/stack) plus a CellSpec body. The location uses the user-facing names rather than internal IDs so a profile is portable between hosts.

Prefix is an optional override for the prefix used when generating cell names; when unset, the prefix defaults to metadata.name. Every Materialize call appends a `-<6hex>` suffix so each invocation produces a fresh cell — CellProfile is always a template. Use the Cell kind for singleton workloads.

type CellSpec

type CellSpec struct {
	ID              string          `json:"id"                        yaml:"id"`
	RealmID         string          `json:"realmId"                   yaml:"realmId"`
	SpaceID         string          `json:"spaceId"                   yaml:"spaceId"`
	StackID         string          `json:"stackId"                   yaml:"stackId"`
	RootContainerID string          `json:"rootContainerId,omitempty" yaml:"rootContainerId,omitempty"`
	Tty             *CellTty        `json:"tty,omitempty"             yaml:"tty,omitempty"`
	Containers      []ContainerSpec `json:"containers"                yaml:"containers"`
	// AutoDelete asks kukeond to delete this cell best-effort after its root
	// container's task exits (any rc). Set by `kuke run --rm`. Cleanup is
	// scoped to the cell only — never cascades to stack/space/realm. Best-
	// effort: a daemon crash between task-exit and delete-completion leaves
	// an orphan that #161's reconciliation loop will eventually sweep.
	AutoDelete bool `json:"autoDelete,omitempty"      yaml:"autoDelete,omitempty"`
}

type CellState

type CellState int
const (
	CellStatePending CellState = iota
	CellStateReady
	CellStateStopped
	CellStateFailed
	CellStateUnknown
)

func (*CellState) String

func (c *CellState) String() string

type CellStatus

type CellStatus struct {
	State      CellState         `json:"state"             yaml:"state"`
	CgroupPath string            `json:"cgroupPath"        yaml:"cgroupPath"`
	Network    CellNetworkStatus `json:"network,omitempty" yaml:"network,omitempty"`
	Containers []ContainerStatus `json:"containers"        yaml:"containers"`
}

type CellTty added in v0.3.0

type CellTty struct {
	// Default names the attachable container `kuke run -a` (phase 2a)
	// selects when no --container flag is given. Must reference an
	// existing container in this cell whose Attachable=true (or be empty).
	Default string `json:"default,omitempty" yaml:"default,omitempty"`
}

CellTty is cell-level tty/attach config. Kept intentionally minimal: only fields the container or container-level tty cannot express belong here.

type ClientConfigurationDoc added in v0.3.0

type ClientConfigurationDoc struct {
	APIVersion Version                     `json:"apiVersion" yaml:"apiVersion"`
	Kind       Kind                        `json:"kind"       yaml:"kind"`
	Metadata   ClientConfigurationMetadata `json:"metadata"   yaml:"metadata"`
	Spec       ClientConfigurationSpec     `json:"spec"       yaml:"spec"`
}

ClientConfigurationDoc is the kuke-side configuration document. It is loaded by the `kuke` cobra root via `kuke --configuration <path>` (default `~/.kuke/kuke.yaml`) and seeds defaults for client-only settings such as the daemon endpoint and the default output format. It is not a server-side resource: `kuke apply` rejects it.

type ClientConfigurationMetadata added in v0.3.0

type ClientConfigurationMetadata struct {
	Name   string            `json:"name"             yaml:"name"`
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
}

type ClientConfigurationSpec added in v0.3.0

type ClientConfigurationSpec struct {
	// Host is the kukeond endpoint kuke dials by default
	// (`unix:///run/kukeon/kukeond.sock` or `ssh://user@host`).
	Host string `json:"host,omitempty"             yaml:"host,omitempty"`
	// RunPath is the kukeon runtime root used by `--no-daemon` operations
	// that read /opt/kukeon directly instead of going through kukeond.
	RunPath string `json:"runPath,omitempty"          yaml:"runPath,omitempty"`
	// ContainerdSocket is the containerd unix socket `--no-daemon`
	// operations connect to.
	ContainerdSocket string `json:"containerdSocket,omitempty" yaml:"containerdSocket,omitempty"`
	// LogLevel is the client log level when `--verbose` is on
	// (debug, info, warn, error).
	LogLevel string `json:"logLevel,omitempty"         yaml:"logLevel,omitempty"`
}

ClientConfigurationSpec carries kuke-only settings. Each field is optional: an absent or empty value falls back to the client's hardcoded default. Explicit command-line flags (`--host`, `--log-level`, …) and matching env vars (`KUKEON_HOST`, `KUKEON_LOG_LEVEL`, …) still take precedence over values loaded from this document.

type ContainerCapabilities added in v0.2.0

type ContainerCapabilities struct {
	Drop []string `json:"drop,omitempty" yaml:"drop,omitempty"`
	Add  []string `json:"add,omitempty"  yaml:"add,omitempty"`
}

ContainerCapabilities groups Linux capability deltas applied to the container process relative to the image default set.

type ContainerDoc

type ContainerDoc struct {
	APIVersion Version           `json:"apiVersion" yaml:"apiVersion"`
	Kind       Kind              `json:"kind"       yaml:"kind"`
	Metadata   ContainerMetadata `json:"metadata"   yaml:"metadata"`
	Spec       ContainerSpec     `json:"spec"       yaml:"spec"`
	Status     ContainerStatus   `json:"status"     yaml:"status"`
}

func NewContainerDoc

func NewContainerDoc(from *ContainerDoc) *ContainerDoc

NewContainerDoc creates a ContainerDoc ensuring all nested structs are initialized.

type ContainerMetadata

type ContainerMetadata struct {
	Name   string            `json:"name"   yaml:"name"`
	Labels map[string]string `json:"labels" yaml:"labels"`
}

type ContainerResources added in v0.2.0

type ContainerResources struct {
	MemoryLimitBytes *int64 `json:"memoryLimitBytes,omitempty" yaml:"memoryLimitBytes,omitempty"`
	CPUShares        *int64 `json:"cpuShares,omitempty"        yaml:"cpuShares,omitempty"`
	PidsLimit        *int64 `json:"pidsLimit,omitempty"        yaml:"pidsLimit,omitempty"`
}

ContainerResources exposes the cgroup v2 knobs the orchestrator supports for per-container resource limits.

type ContainerSecret added in v0.2.0

type ContainerSecret struct {
	Name      string `json:"name"                yaml:"name"`
	FromFile  string `json:"fromFile,omitempty"  yaml:"fromFile,omitempty"`
	FromEnv   string `json:"fromEnv,omitempty"   yaml:"fromEnv,omitempty"`
	MountPath string `json:"mountPath,omitempty" yaml:"mountPath,omitempty"`
}

ContainerSecret references a credential that the daemon resolves at apply time and injects into the container — either as an environment variable (default) or as a read-only file when MountPath is set. Only the reference is persisted; the resolved value is never written to status, metadata, or logs.

type ContainerSpec

type ContainerSpec struct {
	ID           string   `json:"id"                               yaml:"id"`
	ContainerdID string   `json:"containerdId,omitempty"           yaml:"containerdId,omitempty"`
	RealmID      string   `json:"realmId"                          yaml:"realmId"`
	SpaceID      string   `json:"spaceId"                          yaml:"spaceId"`
	StackID      string   `json:"stackId"                          yaml:"stackId"`
	CellID       string   `json:"cellId"                           yaml:"cellId"`
	Root         bool     `json:"root,omitempty"                   yaml:"root,omitempty"`
	Image        string   `json:"image"                            yaml:"image"`
	Command      string   `json:"command"                          yaml:"command"`
	Args         []string `json:"args"                             yaml:"args"`
	// WorkingDir sets the cwd of the spawned container process — OCI
	// process.cwd, Docker WORKDIR, K8s Container.workingDir. Empty falls
	// back to the image's WORKDIR (no behavior change for existing specs).
	WorkingDir      string        `json:"workingDir,omitempty"             yaml:"workingDir,omitempty"`
	Env             []string      `json:"env"                              yaml:"env"`
	Ports           []string      `json:"ports"                            yaml:"ports"`
	Volumes         []VolumeMount `json:"volumes"                          yaml:"volumes"`
	Networks        []string      `json:"networks"                         yaml:"networks"`
	NetworksAliases []string      `json:"networksAliases"                  yaml:"networksAliases"`
	Privileged      bool          `json:"privileged"                       yaml:"privileged"`
	// HostNetwork opts the container into the host's network namespace.
	// When true, the runner omits the network LinuxNamespace from the OCI
	// spec (containerd's WithHostNamespace) and does not invoke CNI attach,
	// since a host-netns container has no per-container veth to wire up.
	// Used by the kukeond bootstrap so daemon-installed bridges, veths, and
	// iptables rules land in host scope where kubelet-style CNI plumbing
	// belongs. Default false — no behavior change for existing specs.
	HostNetwork bool `json:"hostNetwork,omitempty"            yaml:"hostNetwork,omitempty"`
	// HostPID opts the container into the host's PID namespace. When true,
	// the runner omits the PID LinuxNamespace from the OCI spec so /proc
	// inside the container reflects host PIDs. Used by the kukeond bootstrap
	// so the CNI bridge plugin running inside the daemon can resolve the
	// host PIDs containerd returns from task.Pid() — without this, attaching
	// user cells to a network fails with `Statfs /proc/<host-pid>/ns/net:
	// no such file or directory`. Default false — no behavior change for
	// existing specs.
	HostPID                bool                   `json:"hostPID,omitempty"                yaml:"hostPID,omitempty"`
	User                   string                 `json:"user,omitempty"                   yaml:"user,omitempty"`
	ReadOnlyRootFilesystem bool                   `json:"readOnlyRootFilesystem,omitempty" yaml:"readOnlyRootFilesystem,omitempty"`
	Capabilities           *ContainerCapabilities `json:"capabilities,omitempty"           yaml:"capabilities,omitempty"`
	SecurityOpts           []string               `json:"securityOpts,omitempty"           yaml:"securityOpts,omitempty"`
	Tmpfs                  []ContainerTmpfsMount  `json:"tmpfs,omitempty"                  yaml:"tmpfs,omitempty"`
	Resources              *ContainerResources    `json:"resources,omitempty"              yaml:"resources,omitempty"`
	Secrets                []ContainerSecret      `json:"secrets,omitempty"                yaml:"secrets,omitempty"`
	CNIConfigPath          string                 `json:"cniConfigPath,omitempty"          yaml:"cniConfigPath,omitempty"`
	RestartPolicy          string                 `json:"restartPolicy"                    yaml:"restartPolicy"`
	// Attachable opts the container into sbsh-wrapper injection. When true,
	// the daemon prepends `sbsh terminal --run-path /run/kukeon/tty …` to
	// process.args, bind-mounts the sbsh binary read-only at /.kukeon/bin/sbsh,
	// and bind-mounts a per-container tty directory at /run/kukeon/tty (sbsh
	// owns its socket, capture, and log files inside it). The host-visible
	// peer of that directory lives in the per-container metadata dir and its
	// `socket` entry is what `kuke attach` connects to. Default false — no
	// behavior change for existing specs.
	Attachable bool `json:"attachable,omitempty"             yaml:"attachable,omitempty"`
	// Tty configures shell-UX (prompt, init scripts) for the sbsh wrapper
	// when Attachable=true. The container model already owns command, args,
	// workingDir, and env, so Tty intentionally only adds layers the
	// container model can't express. Setting any tty field with
	// Attachable=false is a validation error.
	Tty *ContainerTty `json:"tty,omitempty"                    yaml:"tty,omitempty"`
}

type ContainerState

type ContainerState int
const (
	ContainerStatePending ContainerState = iota
	ContainerStateReady
	ContainerStateStopped
	ContainerStatePaused
	ContainerStatePausing
	ContainerStateFailed
	ContainerStateUnknown
)

func (*ContainerState) String

func (c *ContainerState) String() string

type ContainerStatus

type ContainerStatus struct {
	Name         string         `json:"name"         yaml:"name"`
	ID           string         `json:"id"           yaml:"id"`
	State        ContainerState `json:"state"        yaml:"state"`
	RestartCount int            `json:"restartCount" yaml:"restartCount"`
	RestartTime  time.Time      `json:"restartTime"  yaml:"restartTime"`
	StartTime    time.Time      `json:"startTime"    yaml:"startTime"`
	FinishTime   time.Time      `json:"finishTime"   yaml:"finishTime"`
	ExitCode     int            `json:"exitCode"     yaml:"exitCode"`
	ExitSignal   string         `json:"exitSignal"   yaml:"exitSignal"`
}

type ContainerTmpfsMount added in v0.2.0

type ContainerTmpfsMount struct {
	Path      string   `json:"path"                yaml:"path"`
	SizeBytes int64    `json:"sizeBytes,omitempty" yaml:"sizeBytes,omitempty"`
	Options   []string `json:"options,omitempty"   yaml:"options,omitempty"`
}

ContainerTmpfsMount declares a tmpfs mount inside the container.

type ContainerTty added in v0.3.0

type ContainerTty struct {
	// Prompt is the literal prompt expression sbsh sets in the wrapped
	// shell, in the same form sbsh's TerminalProfile spec.shell.prompt
	// accepts (e.g. a quoted PS1-style string).
	Prompt string `json:"prompt,omitempty" yaml:"prompt,omitempty"`
	// OnInit are scripts run once when the wrapped shell starts, in order.
	OnInit []TtyStage `json:"onInit,omitempty" yaml:"onInit,omitempty"`
}

ContainerTty carries per-attach shell-UX config that the daemon threads into sbsh terminal on first attach. Has no effect unless Attachable=true.

func (*ContainerTty) IsEmpty added in v0.3.0

func (t *ContainerTty) IsEmpty() bool

IsEmpty reports whether the tty block carries no user-supplied config — i.e. equivalent to omitting the block entirely. Used by validation to distinguish "explicitly empty" from "any field set".

type EgressAllowRule added in v0.2.0

type EgressAllowRule struct {
	Host  string `json:"host,omitempty"  yaml:"host,omitempty"`
	CIDR  string `json:"cidr,omitempty"  yaml:"cidr,omitempty"`
	Ports []int  `json:"ports,omitempty" yaml:"ports,omitempty"`
}

EgressAllowRule describes a single permitted destination. Exactly one of Host or CIDR must be set. Ports, when non-empty, constrains to those TCP destination ports; empty Ports means "any port on this destination".

Host entries are resolved to IPs by the daemon at apply time; the resulting iptables rules reflect the IPs known at that moment. See the Space manifest docs for the TTL caveat.

type EgressDefault added in v0.2.0

type EgressDefault string

EgressDefault is the fallthrough action when no allowlist rule matches.

const (
	EgressDefaultAllow EgressDefault = "allow"
	EgressDefaultDeny  EgressDefault = "deny"
)

type EgressPolicy added in v0.2.0

type EgressPolicy struct {
	Default EgressDefault     `json:"default"         yaml:"default"`
	Allow   []EgressAllowRule `json:"allow,omitempty" yaml:"allow,omitempty"`
}

EgressPolicy constrains outbound traffic leaving the space bridge toward the host or external networks. When nil, traffic is unconstrained (current behavior). An explicit Default=allow with no Allow rules also matches current behavior.

type Kind

type Kind string
const (
	// KindCell identifies cell documents.
	KindCell Kind = "Cell"
	// KindContainer identifies container documents.
	KindContainer Kind = "Container"
	// KindRealm identifies realm documents.
	KindRealm Kind = "Realm"
	// KindSpace identifies space documents.
	KindSpace Kind = "Space"
	// KindStack identifies stack documents.
	KindStack Kind = "Stack"
	// KindCellProfile identifies per-user cell-template documents loaded by
	// `kuke run -p`. Profiles are not server-side resources — `kuke apply`
	// rejects them.
	KindCellProfile Kind = "CellProfile"
	// KindServerConfiguration identifies the kukeond daemon's configuration
	// document loaded via `kukeond --configuration` (and consumed by
	// `kuke init --server-configuration`). Not a server-side resource —
	// `kuke apply` rejects it.
	KindServerConfiguration Kind = "ServerConfiguration"
	// KindClientConfiguration identifies the kuke client's configuration
	// document loaded via `kuke --configuration` (default
	// `~/.kuke/kuke.yaml`). Not a server-side resource — `kuke apply`
	// rejects it.
	KindClientConfiguration Kind = "ClientConfiguration"
)

Kinds.

type RealmDoc

type RealmDoc struct {
	APIVersion Version       `json:"apiVersion" yaml:"apiVersion"`
	Kind       Kind          `json:"kind"       yaml:"kind"`
	Metadata   RealmMetadata `json:"metadata"   yaml:"metadata"`
	Spec       RealmSpec     `json:"spec"       yaml:"spec"`
	Status     RealmStatus   `json:"status"     yaml:"status"`
}

type RealmMetadata

type RealmMetadata struct {
	Name   string            `json:"name"   yaml:"name"`
	Labels map[string]string `json:"labels" yaml:"labels"`
}

type RealmSpec

type RealmSpec struct {
	Namespace           string                `json:"namespace"                     yaml:"namespace"`
	RegistryCredentials []RegistryCredentials `json:"registryCredentials,omitempty" yaml:"registryCredentials,omitempty"`
}

type RealmState

type RealmState int
const (
	RealmStatePending RealmState = iota
	RealmStateCreating
	RealmStateReady
	RealmStateDeleting
	RealmStateFailed
	RealmStateUnknown
)

func (*RealmState) String

func (r *RealmState) String() string

type RealmStatus

type RealmStatus struct {
	State      RealmState `json:"state"`
	CgroupPath string     `json:"cgroupPath,omitempty" yaml:"cgroupPath,omitempty"`
}

type RegistryCredentials

type RegistryCredentials struct {
	// Username is the registry username.
	Username string `json:"username"                yaml:"username"`
	// Password is the registry password or token.
	Password string `json:"password"                yaml:"password"`
	// ServerAddress is the registry server address (e.g., "docker.io", "registry.example.com").
	// If empty, credentials apply to the registry extracted from the image reference.
	ServerAddress string `json:"serverAddress,omitempty" yaml:"serverAddress,omitempty"`
}

RegistryCredentials contains authentication information for a container registry.

type ServerConfigurationDoc added in v0.3.0

type ServerConfigurationDoc struct {
	APIVersion Version                     `json:"apiVersion" yaml:"apiVersion"`
	Kind       Kind                        `json:"kind"       yaml:"kind"`
	Metadata   ServerConfigurationMetadata `json:"metadata"   yaml:"metadata"`
	Spec       ServerConfigurationSpec     `json:"spec"       yaml:"spec"`
}

ServerConfigurationDoc is the kukeond-side configuration document. It is loaded by the kukeond daemon (via `kukeond --configuration <path>`) and by `kuke init --server-configuration <path>` when bootstrapping the daemon. It is not a server-side resource: `kuke apply` rejects it.

type ServerConfigurationMetadata added in v0.3.0

type ServerConfigurationMetadata struct {
	Name   string            `json:"name"             yaml:"name"`
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
}

type ServerConfigurationSpec added in v0.3.0

type ServerConfigurationSpec struct {
	// Socket is the unix socket path the daemon listens on.
	Socket string `json:"socket,omitempty"           yaml:"socket,omitempty"`
	// SocketGID is the numeric group ID the daemon chowns its listener
	// socket to (mode 0o660 with group). Zero means root-only access.
	SocketGID int `json:"socketGID,omitempty"        yaml:"socketGID,omitempty"`
	// RunPath is the kukeon runtime root (e.g. /opt/kukeon).
	RunPath string `json:"runPath,omitempty"          yaml:"runPath,omitempty"`
	// ContainerdSocket is the path to the containerd unix socket the
	// daemon connects to.
	ContainerdSocket string `json:"containerdSocket,omitempty" yaml:"containerdSocket,omitempty"`
	// LogLevel is the daemon log level (debug, info, warn, error).
	LogLevel string `json:"logLevel,omitempty"         yaml:"logLevel,omitempty"`
	// KukeondImage is the container image `kuke init` provisions for the
	// kukeond system cell. Read by `kuke init` only; the daemon ignores it.
	KukeondImage string `json:"kukeondImage,omitempty"     yaml:"kukeondImage,omitempty"`
}

ServerConfigurationSpec carries kukeond-only settings. Each field is optional: an absent or empty value falls back to the daemon's hardcoded default. Explicit command-line flags (`--socket`, `--run-path`, …) still take precedence over values loaded from this document.

type SpaceContainerDefaults added in v0.2.0

type SpaceContainerDefaults struct {
	User                   string                 `json:"user,omitempty"                   yaml:"user,omitempty"`
	ReadOnlyRootFilesystem *bool                  `json:"readOnlyRootFilesystem,omitempty" yaml:"readOnlyRootFilesystem,omitempty"`
	Capabilities           *ContainerCapabilities `json:"capabilities,omitempty"           yaml:"capabilities,omitempty"`
	SecurityOpts           []string               `json:"securityOpts,omitempty"           yaml:"securityOpts,omitempty"`
	Tmpfs                  []ContainerTmpfsMount  `json:"tmpfs,omitempty"                  yaml:"tmpfs,omitempty"`
	Resources              *ContainerResources    `json:"resources,omitempty"              yaml:"resources,omitempty"`
}

SpaceContainerDefaults mirrors the isolation-related fields on ContainerSpec. Each field is applied to a Container only when the Container leaves it empty. Inheritance is shallow: a Container that sets Capabilities replaces the Space default outright — Drop and Add slices are not merged.

ReadOnlyRootFilesystem is a *bool so the default can distinguish "not set" from an explicit "false"; Container.Spec.ReadOnlyRootFilesystem is still a plain bool, so a Container cannot opt out of a Space default that enables it.

type SpaceDefaults added in v0.2.0

type SpaceDefaults struct {
	Container *SpaceContainerDefaults `json:"container,omitempty" yaml:"container,omitempty"`
}

SpaceDefaults declares default values that Kukeon inherits into resources created inside the Space unless the resource's own spec overrides the field. It exists so the isolation envelope can be declared once on the Space and reused by every Container that lives in it.

type SpaceDoc

type SpaceDoc struct {
	APIVersion Version       `json:"apiVersion" yaml:"apiVersion"`
	Kind       Kind          `json:"kind"       yaml:"kind"`
	Metadata   SpaceMetadata `json:"metadata"   yaml:"metadata"`
	Spec       SpaceSpec     `json:"spec"       yaml:"spec"`
	Status     SpaceStatus   `json:"status"     yaml:"status"`
}

type SpaceMetadata

type SpaceMetadata struct {
	Name   string            `json:"name"   yaml:"name"`
	Labels map[string]string `json:"labels" yaml:"labels"`
}

type SpaceNetwork added in v0.2.0

type SpaceNetwork struct {
	Egress *EgressPolicy `json:"egress,omitempty" yaml:"egress,omitempty"`
}

SpaceNetwork groups network-scoped policy applied to the space bridge.

type SpaceSpec

type SpaceSpec struct {
	RealmID       string         `json:"realmId"                 yaml:"realmId"`
	CNIConfigPath string         `json:"cniConfigPath,omitempty" yaml:"cniConfigPath,omitempty"`
	Network       *SpaceNetwork  `json:"network,omitempty"       yaml:"network,omitempty"`
	Defaults      *SpaceDefaults `json:"defaults,omitempty"      yaml:"defaults,omitempty"`
}

type SpaceState

type SpaceState int
const (
	SpaceStatePending SpaceState = iota
	SpaceStateReady
	SpaceStateFailed
	SpaceStateUnknown
)

func (*SpaceState) String

func (s *SpaceState) String() string

type SpaceStatus

type SpaceStatus struct {
	State      SpaceState `json:"state"                yaml:"state"`
	CgroupPath string     `json:"cgroupPath,omitempty" yaml:"cgroupPath,omitempty"`
}

type StackDoc

type StackDoc struct {
	APIVersion Version       `json:"apiVersion" yaml:"apiVersion"`
	Kind       Kind          `json:"kind"       yaml:"kind"`
	Metadata   StackMetadata `json:"metadata"   yaml:"metadata"`
	Spec       StackSpec     `json:"spec"       yaml:"spec"`
	Status     StackStatus   `json:"status"     yaml:"status"`
}

type StackMetadata

type StackMetadata struct {
	Name   string            `json:"name"   yaml:"name"`
	Labels map[string]string `json:"labels" yaml:"labels"`
}

type StackSpec

type StackSpec struct {
	ID      string `json:"id"      yaml:"id"`
	RealmID string `json:"realmId" yaml:"realmId"`
	SpaceID string `json:"spaceId" yaml:"spaceId"`
}

type StackState

type StackState int
const (
	StackStatePending StackState = iota
	StackStateReady
	StackStateFailed
	StackStateUnknown
)

func (*StackState) String

func (s *StackState) String() string

type StackStatus

type StackStatus struct {
	State      StackState `json:"state"      yaml:"state"`
	CgroupPath string     `json:"cgroupPath" yaml:"cgroupPath"`
}

type TtyStage added in v0.3.0

type TtyStage struct {
	Script string `json:"script,omitempty" yaml:"script,omitempty"`
}

TtyStage is a single onInit script entry. Wrapped in a struct rather than a bare string so future stage knobs (timeout, runOn, etc.) can land without breaking the YAML shape.

type Version

type Version string
const (
	// APIVersionV1Beta1 is the canonical API version for this package.
	APIVersionV1Beta1 Version = "v1beta1"
)

type VolumeMount added in v0.2.0

type VolumeMount struct {
	Source   string `json:"source"             yaml:"source"`
	Target   string `json:"target"             yaml:"target"`
	ReadOnly bool   `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
}

VolumeMount is a bind mount of a host path into a container.

Jump to

Keyboard shortcuts

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