v1alpha1

package
v0.0.0-...-2feda2a Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the agents v1alpha1 API group. +kubebuilder:object:generate=true +groupName=ate.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "ate.dev", Version: "v1alpha1"}
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = GroupVersion

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} //nolint:staticcheck // SA1019: scheme.Builder is the conventional kubebuilder pattern for api packages.

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ActorTemplate

type ActorTemplate struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec defines the desired state of ActorTemplate. This field is immutable.
	// +required
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Spec is immutable"
	Spec ActorTemplateSpec `json:"spec"`

	// status is the observed state of ActorTemplate
	// +optional
	Status ActorTemplateStatus `json:"status,omitempty"`
}

+genclient +kubebuilder:object:generate=true +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced,shortName=actortemplate +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Class",type=string,JSONPath=`.spec.sandboxClass`

func (*ActorTemplate) DeepCopy

func (in *ActorTemplate) DeepCopy() *ActorTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActorTemplate.

func (*ActorTemplate) DeepCopyInto

func (in *ActorTemplate) DeepCopyInto(out *ActorTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ActorTemplate) DeepCopyObject

func (in *ActorTemplate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ActorTemplateList

type ActorTemplateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ActorTemplate `json:"items"`
}

ActorTemplateList contains a list of ActorTemplates. +kubebuilder:object:generate=true +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced,shortName=actortemplate

func (*ActorTemplateList) DeepCopy

func (in *ActorTemplateList) DeepCopy() *ActorTemplateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActorTemplateList.

func (*ActorTemplateList) DeepCopyInto

func (in *ActorTemplateList) DeepCopyInto(out *ActorTemplateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ActorTemplateList) DeepCopyObject

func (in *ActorTemplateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ActorTemplateSpec

type ActorTemplateSpec struct {
	// PauseImage is the container to use as the root sandbox container.
	//
	// Typically, set it to [1] for on-gcp, and [2] for off-gcp
	//
	//   - [1] gcr.io/gke-release/pause@sha256:bcbd57ba5653580ec647b16d8163cdd1112df3609129b01f912a8032e48265da
	//   - [2] registry.k8s.io/pause:3.10.2@sha256:f548e0e8e3dc1896ca956272154dde3314e8cc4fde0a57577ee9fa1c63f5baf4
	//
	// +required
	// +kubebuilder:validation:XValidation:rule="self.contains('@')",message="All images must be pinned (changing the image invalidates snapshots)"
	PauseImage string `json:"pauseImage,omitempty"`

	// Containers is the workload definition.
	//
	// +optional
	// +kubebuilder:validation:MaxItems=10
	Containers []Container `json:"containers,omitempty"`

	// Snapshots configuration for the actor.
	//
	// +required
	SnapshotsConfig SnapshotsConfig `json:"snapshotsConfig"`

	// SandboxClass selects the sandbox runtime family this template's actors run
	// on. Only worker pools whose SandboxClass matches are eligible. Snapshots are
	// not portable across classes, so this is a hard gate, AND'd with WorkerSelector
	// and the actor's worker_selector. Defaults to gvisor.
	//
	// TODO: This is almost certainly insufficient.  We have to decide a number of things:
	//
	// 1) How does someone discover what classes are available, or what they mean?
	// 2) How does someone define a new sandbox class?
	// 3) Does a class mean the specific type of sandbox tech or does it include some aspect of config (e.g. can we have 2 different classes which both use gVisor with different config, or 2 classes which use different microvms)
	// 4) How does the default get set and who sets it?
	//
	// See Also: WorkerPool SandboxClass
	//
	//
	// +optional
	// +kubebuilder:validation:Enum=gvisor;microvm
	// +kubebuilder:default=gvisor
	SandboxClass SandboxClass `json:"sandboxClass,omitempty"`

	// WorkerSelector restricts which worker pools actors from this template may
	// use. The scheduler only considers pools whose labels match this selector.
	// If nil, all pools are eligible (subject to the actor's own worker_selector).
	// Acts as a gate: the actor's worker_selector can only narrow this set further,
	// never expand it.
	//
	// +optional
	WorkerSelector *metav1.LabelSelector `json:"workerSelector,omitempty"`

	// Volumes defines the volumes to mount into all containers in the actor.
	//
	// +optional
	// +kubebuilder:validation:MaxItems=32
	Volumes []Volume `json:"volumes,omitempty"`
}

ActorTemplateSpec defined desired spec of an actor.

+kubebuilder:validation:XValidation:rule="(has(self.sandboxClass) && self.sandboxClass == 'microvm') || !has(self.volumes) || self.volumes.filter(v, has(v.durableDir)).size() <= 1",message="Only one DurableDir-typed volume is supported when sandboxClass is 'gvisor'" +kubebuilder:validation:XValidation:rule="(has(self.sandboxClass) && self.sandboxClass == 'microvm') || !has(self.containers) || self.containers.all(c, !has(c.volumeMounts) || c.volumeMounts.filter(vm, has(self.volumes) && self.volumes.exists(v, v.name == vm.name && has(v.durableDir))).size() <= 1)",message="A container may mount only one DurableDir-typed volume when sandboxClass is 'gvisor'" +kubebuilder:validation:XValidation:rule="!has(self.volumes) || self.volumes.all(v, has(self.containers) && self.containers.exists(c, has(c.volumeMounts) && c.volumeMounts.exists(vm, vm.name == v.name)))",message="All volumes defined in spec.volumes must be mounted by at least one container" +kubebuilder:validation:XValidation:rule="!has(self.sandboxClass) || self.sandboxClass != 'microvm' || !has(self.volumes) || !self.volumes.exists(v, has(v.externalVolumeTemplate))",message="ExternalVolumes are not supported when sandboxClass is 'microvm'" +kubebuilder:validation:XValidation:rule="(has(self.sandboxClass) && self.sandboxClass == 'microvm') || !has(self.snapshotsConfig.onResume) || (has(self.snapshotsConfig.onResume.fromData) ? self.snapshotsConfig.onResume.fromData : 'ColdBoot') != 'Golden'",message="onResume.fromData: Golden is not supported when sandboxClass is 'gvisor'"

func (*ActorTemplateSpec) DeepCopy

func (in *ActorTemplateSpec) DeepCopy() *ActorTemplateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActorTemplateSpec.

func (*ActorTemplateSpec) DeepCopyInto

func (in *ActorTemplateSpec) DeepCopyInto(out *ActorTemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActorTemplateStatus

type ActorTemplateStatus struct {
	// Phase of the actor template.
	// +optional
	Phase PhaseType `json:"phase,omitempty"`

	GoldenActorID        string      `json:"goldenActorID,omitempty"`
	TakeGoldenSnapshotAt metav1.Time `json:"takeGoldenSnapshotAt,omitempty"`
	GoldenSnapshot       string      `json:"goldenSnapshot,omitempty"`

	// conditions defines the status conditions array
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

TODO: add validation

func (*ActorTemplateStatus) DeepCopy

func (in *ActorTemplateStatus) DeepCopy() *ActorTemplateStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActorTemplateStatus.

func (*ActorTemplateStatus) DeepCopyInto

func (in *ActorTemplateStatus) DeepCopyInto(out *ActorTemplateStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AssetFile

type AssetFile struct {
	// URL is where to download the asset from (e.g. a gs:// URL). It may be
	// fetched anonymously or with credentials depending on atelet's
	// configuration.
	//
	// +required
	// +kubebuilder:validation:MinLength=1
	URL string `json:"url"`

	// SHA256 is the lower-case hex SHA256 of the asset. It both names the cached
	// file (preventing collisions) and verifies the download's integrity.
	//
	// +required
	// +kubebuilder:validation:Pattern=`^[a-f0-9]{64}$`
	SHA256 string `json:"sha256"`
}

AssetFile is one content-addressed file that atelet fetches for a sandbox runtime (e.g. the gVisor runsc binary, or a micro-VM kernel/firmware/config).

func (*AssetFile) DeepCopy

func (in *AssetFile) DeepCopy() *AssetFile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssetFile.

func (*AssetFile) DeepCopyInto

func (in *AssetFile) DeepCopyInto(out *AssetFile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Container

type Container struct {
	// Name of the container.
	//
	// +required
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:XValidation:rule="!format.dns1123Label().validate(self).hasValue()",message="Name must be a valid DNS label"
	Name string `json:"name"`

	// Image to use for the worker replicas.
	//
	// +required
	// +kubebuilder:validation:XValidation:rule="self.contains('@')",message="All images must be pinned (changing the image invalidates snapshots)"
	Image string `json:"image,omitempty"`

	// Entrypoint array. Not executed within a shell. The container image's
	// ENTRYPOINT is used if this is not provided; if it is provided, the
	// image's ENTRYPOINT and CMD are both ignored and the process argv is
	// command + args.
	//
	// Unlike Kubernetes, variable references $(VAR_NAME) are NOT expanded.
	//
	// +optional
	// +kubebuilder:validation:MaxItems=64
	// +listType=atomic
	Command []string `json:"command,omitempty"`

	// Arguments to the entrypoint. Not executed within a shell. The container
	// image's CMD is used if this is not provided (unless command is set,
	// which discards the image's CMD).
	//
	// Unlike Kubernetes, variable references $(VAR_NAME) are NOT expanded.
	//
	// +optional
	// +kubebuilder:validation:MaxItems=64
	// +listType=atomic
	Args []string `json:"args,omitempty"`

	// Environment variables to set in the worker replicas.
	//
	// +optional
	// +kubebuilder:validation:MaxItems=32
	Env []EnvVar `json:"env,omitempty"`

	// Readyz is an optional HTTP readiness probe. When set, the actor is not
	// considered ready (and Run/Restore RPCs do not return success) until the
	// container's HTTP endpoint returns 200.
	//
	// +optional
	Readyz *ContainerReadyz `json:"readyz,omitempty"`

	// volumeMounts define the volumes to mount into this container.
	//
	// +optional
	// +kubebuilder:validation:MaxItems=32
	VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"`
}

A single application container that you want to run within a WorkerPool.

func (*Container) DeepCopy

func (in *Container) DeepCopy() *Container

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Container.

func (*Container) DeepCopyInto

func (in *Container) DeepCopyInto(out *Container)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContainerReadyz

type ContainerReadyz struct {
	// HTTPGet specifies the HTTP request to perform against the container.
	//
	// +required
	HTTPGet *HTTPGetAction `json:"httpGet"`

	// TimeoutSeconds is how long to keep polling HTTPGet before giving up.
	// Exceeding it fails the actor start rather than proceeding with a
	// container that never reported ready.
	//
	// How long a workload takes to become ready is a property of that workload,
	// which is why this is set per template rather than cluster-wide: a heavy
	// runtime that needs minutes should not force every other template to wait
	// as long before its failures surface.
	//
	// Unset defaults to 30, applied by the API server so the effective value is
	// visible on the stored object rather than only in the ateom. A manifest
	// asking for 0 is rejected: unlike a warmup delay, a zero deadline could
	// never be met, so it is never what a template author means.
	//
	// +optional
	// +kubebuilder:default=30
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=3600
	TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
}

ContainerReadyz configures the readiness signal for a container.

func (*ContainerReadyz) DeepCopy

func (in *ContainerReadyz) DeepCopy() *ContainerReadyz

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerReadyz.

func (*ContainerReadyz) DeepCopyInto

func (in *ContainerReadyz) DeepCopyInto(out *ContainerReadyz)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DurableDirVolumeSource

type DurableDirVolumeSource struct {
}

Represents a durable directory on rootfs that persists across resumes and participates in snapshots.

func (*DurableDirVolumeSource) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DurableDirVolumeSource.

func (*DurableDirVolumeSource) DeepCopyInto

func (in *DurableDirVolumeSource) DeepCopyInto(out *DurableDirVolumeSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvVar

type EnvVar struct {
	// Name is the name of the environment variable. May be any printable ASCII
	// character except '='.
	//
	// +required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Pattern=`^[ -<>-~]+$`
	Name string `json:"name"`

	// Variable value. Mutually exclusive with ValueFrom.
	// Value is the literal value of the environment variable. Unlike in
	// Kubernetes pods, this value is not interpolated, and $(VAR)
	// references are not expanded.
	//
	// +optional
	// +kubebuilder:validation:MinLength=0
	Value *string `json:"value,omitempty"`

	// Source for the environment variable's value. Mutually exclusive with
	// Value.
	//
	// +optional
	ValueFrom *EnvVarSource `json:"valueFrom,omitempty"`
}

EnvVar represents an environment variable supplied to a container in an ActorTemplate. It models only a subset of Kubernetes Pod env behavior: literal values are not expanded with Kubernetes-style $(VAR) references, envFrom is not supported, and valueFrom currently supports only secretKeyRef.

+kubebuilder:validation:ExactlyOneOf={value, valueFrom}

func (*EnvVar) DeepCopy

func (in *EnvVar) DeepCopy() *EnvVar

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar.

func (*EnvVar) DeepCopyInto

func (in *EnvVar) DeepCopyInto(out *EnvVar)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvVarSource

type EnvVarSource struct {
	// Selects a key of a Secret in the ActorTemplate's namespace.
	//
	// +optional
	SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty"`
}

EnvVarSource represents a source for the value of an EnvVar. Exactly one of its fields must be set.

+kubebuilder:validation:MinProperties=1 +kubebuilder:validation:MaxProperties=1

func (*EnvVarSource) DeepCopy

func (in *EnvVarSource) DeepCopy() *EnvVarSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarSource.

func (*EnvVarSource) DeepCopyInto

func (in *EnvVarSource) DeepCopyInto(out *EnvVarSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalVolumeTemplate

type ExternalVolumeTemplate struct {
	// capacity specifies the size of the volume to create.
	// +required
	Capacity resource.Quantity `json:"capacity"`
	// storageClassName refers to the StorageClass to create the volume from.
	// +required
	StorageClassName string `json:"storageClassName"`
}

Represents an external volume dynamically provisioned for each actor.

func (*ExternalVolumeTemplate) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalVolumeTemplate.

func (*ExternalVolumeTemplate) DeepCopyInto

func (in *ExternalVolumeTemplate) DeepCopyInto(out *ExternalVolumeTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPGetAction

type HTTPGetAction struct {
	// Path to access on the HTTP server. Defaults to "/readyz".
	// Must be a valid URL path starting with "/". Only characters permitted
	// by RFC 3986 path segments are accepted; percent-escapes must be a
	// literal "%" followed by exactly two hex digits. Query strings ("?")
	// and fragments ("#") must be omitted.
	//
	// +optional
	// +kubebuilder:default="/readyz"
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:Pattern=`^/([A-Za-z0-9\-._~!$&'()*+,;=:@/]|%[0-9A-Fa-f]{2})*$`
	Path string `json:"path,omitempty"`

	// Port to access on the container.
	//
	// +required
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	Port int32 `json:"port"`
}

HTTPGetAction describes an HTTP GET request to perform against the container's interior IP. Modeled after a subset of corev1.HTTPGetAction.

func (*HTTPGetAction) DeepCopy

func (in *HTTPGetAction) DeepCopy() *HTTPGetAction

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPGetAction.

func (*HTTPGetAction) DeepCopyInto

func (in *HTTPGetAction) DeepCopyInto(out *HTTPGetAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OnResumeConfig

type OnResumeConfig struct {
	// FromData applies when the resume uses a Data-scope snapshot (from
	// onPause or onCommit): "ColdBoot" starts fresh from the OCI image with
	// the durable data restored; "Golden" combines the durable data with the
	// template's golden snapshot. Defaults to "ColdBoot".
	//
	// +optional
	// +kubebuilder:default=ColdBoot
	FromData ResumeSource `json:"fromData,omitempty"`
}

OnResumeConfig selects, per snapshot situation, what supplies the guest state at resume. Each field names what is being resumed FROM; the value names the boot source. Full snapshots that are still valid always restore from their own content and are not configurable here.

func (*OnResumeConfig) DeepCopy

func (in *OnResumeConfig) DeepCopy() *OnResumeConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OnResumeConfig.

func (*OnResumeConfig) DeepCopyInto

func (in *OnResumeConfig) DeepCopyInto(out *OnResumeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PhaseType

type PhaseType string
const (
	PhaseInitial           PhaseType = ""
	PhaseResumeGoldenActor PhaseType = "ResumeGoldenActor"
	PhaseWaitGoldenActor   PhaseType = "WaitGoldenActor"
	PhaseReady             PhaseType = "Ready"
	PhaseFailed            PhaseType = "Failed"
)

Define your phases as constants

type ResumeSource

type ResumeSource string

ResumeSource selects what supplies the guest state when an actor is brought back from one of the snapshot situations named by OnResumeConfig's fields. +kubebuilder:validation:Enum=ColdBoot;Golden

const (
	// ResumeSourceColdBoot starts the actor's containers afresh from the OCI
	// image, with the durable-dir volumes pre-populated from the snapshot.
	ResumeSourceColdBoot ResumeSource = "ColdBoot"
	// ResumeSourceGolden restores the ActorTemplate's golden snapshot (guest
	// memory + filesystem delta) and serves the snapshot's durable data to
	// it, so the actor resumes with the golden's warm state over its own
	// data. Requires sandboxClass "microvm".
	ResumeSourceGolden ResumeSource = "Golden"
)

type SandboxClass

type SandboxClass string

SandboxClass selects the sandbox runtime family. It is shared by WorkerPool (which family a pool runs) and SandboxConfig (which family a config is for).

const (
	// SandboxClassGvisor is the gVisor/runsc runtime (cmd/ateom-gvisor). Default.
	SandboxClassGvisor SandboxClass = "gvisor"
	// SandboxClassMicroVM is the micro-VM runtime (cmd/ateom-microvm); needs
	// /dev/kvm and vhost devices.
	SandboxClassMicroVM SandboxClass = "microvm"
)

type SandboxConfig

type SandboxConfig struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec defines the desired state of SandboxConfig
	// +required
	Spec SandboxConfigSpec `json:"spec"`
}

SandboxConfig is cluster-scoped configuration describing the sandbox binaries for a sandbox runtime family. It is referenced (or defaulted) by WorkerPools and decouples sandbox binary selection from ActorTemplate.

+genclient +genclient:nonNamespaced +kubebuilder:object:generate=true +kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster,shortName=sandboxconfig +kubebuilder:printcolumn:name="Class",type=string,JSONPath=`.spec.sandboxClass` +kubebuilder:printcolumn:name="Default",type=boolean,JSONPath=`.spec.default` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

func (*SandboxConfig) DeepCopy

func (in *SandboxConfig) DeepCopy() *SandboxConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SandboxConfig.

func (*SandboxConfig) DeepCopyInto

func (in *SandboxConfig) DeepCopyInto(out *SandboxConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SandboxConfig) DeepCopyObject

func (in *SandboxConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SandboxConfigList

type SandboxConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SandboxConfig `json:"items"`
}

SandboxConfigList contains a list of SandboxConfigs. +kubebuilder:object:generate=true +kubebuilder:object:root=true

func (*SandboxConfigList) DeepCopy

func (in *SandboxConfigList) DeepCopy() *SandboxConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SandboxConfigList.

func (*SandboxConfigList) DeepCopyInto

func (in *SandboxConfigList) DeepCopyInto(out *SandboxConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SandboxConfigList) DeepCopyObject

func (in *SandboxConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SandboxConfigSpec

type SandboxConfigSpec struct {
	// SandboxClass is the sandbox runtime family this config applies to. A
	// WorkerPool only uses SandboxConfigs whose SandboxClass matches its own.
	//
	// +required
	// +kubebuilder:validation:Enum=gvisor;microvm
	// +kubebuilder:default=gvisor
	SandboxClass SandboxClass `json:"sandboxClass"`

	// Default marks this SandboxConfig as the cluster-wide default for its
	// SandboxClass. A WorkerPool with no explicit SandboxConfigName resolves to
	// the default config for its SandboxClass. At most one default is expected
	// per SandboxClass.
	//
	// +optional
	Default bool `json:"default,omitempty"`

	// Assets is the set of files atelet fetches for this runtime, keyed first by
	// architecture (GOARCH, e.g. "amd64", "arm64") and then by asset name. The
	// asset names are interpreted by the sandbox backend: gVisor expects a
	// "gvisor" asset (the release's gvisor.tar.bz2, which atelet extracts so
	// the gvisor-bin/ helpers sit next to runsc; a legacy bare-binary "runsc"
	// asset is still accepted); a micro-VM backend expects several (e.g.
	// "cloud-hypervisor", "kata-kernel", "kata-image"). The schema is
	// intentionally generic; per-class requirements are enforced by a
	// ValidatingAdmissionPolicy.
	//
	// +optional
	Assets map[string]map[string]AssetFile `json:"assets,omitempty"`
}

SandboxConfigSpec is the desired state of a SandboxConfig.

func (*SandboxConfigSpec) DeepCopy

func (in *SandboxConfigSpec) DeepCopy() *SandboxConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SandboxConfigSpec.

func (*SandboxConfigSpec) DeepCopyInto

func (in *SandboxConfigSpec) DeepCopyInto(out *SandboxConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SecretKeySelector

type SecretKeySelector struct {
	// Name of the referent Secret.
	//
	// +required
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="Name must be a valid DNS subdomain"
	Name string `json:"name"`

	// Key to select within the Secret.
	//
	// +required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Pattern=`^[-._a-zA-Z0-9]+$`
	Key string `json:"key"`

	// Specify whether the Secret or its key must be defined.
	//
	// +optional
	Optional *bool `json:"optional,omitempty"`
}

SecretKeySelector selects a key from a Secret.

func (*SecretKeySelector) DeepCopy

func (in *SecretKeySelector) DeepCopy() *SecretKeySelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector.

func (*SecretKeySelector) DeepCopyInto

func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SnapshotScope

type SnapshotScope string

SnapshotScope defines what components to include in a snapshot. +kubebuilder:validation:Enum=Full;Data

const (
	// Full captures process memory plus the entire filesystem delta on top of
	// the OCI image (including any attached DurableDir volumes).
	SnapshotScopeFull SnapshotScope = "Full"
	// Data captures only the contents of attached volumes that support
	// snapshots (currently DurableDir-typed volumes). Process memory and
	// the rest of rootfs are excluded.
	SnapshotScopeData SnapshotScope = "Data"
)

type SnapshotsConfig

type SnapshotsConfig struct {
	// Location to store snapshots in.
	//
	// +required
	// +kubebuilder:validation:MinLength=1
	Location string `json:"location"`

	// OnPause specifies what to include in the snapshot when the actor is paused.
	// If not provided, the "Full" behavior is used by default.
	//
	// +optional
	// +kubebuilder:default=Full
	OnPause SnapshotScope `json:"onPause,omitempty"`

	// OnCommit specifies what to include in the snapshot when a commit is requested.
	// If not provided, the "Full" behavior is used by default.
	// onCommit must be a subset of the onPause content.
	//
	// For example:
	//   - if onPause is "Full", then onCommit can be "Full" or "Data".
	//   - if onPause is "Data", then onCommit must be "Data".
	//
	// +optional
	// +kubebuilder:default=Full
	OnCommit SnapshotScope `json:"onCommit,omitempty"`

	// OnResume specifies, per snapshot situation, what supplies the guest
	// state at resume (see OnResumeConfig). "fromData: Golden" requires
	// sandboxClass "microvm".
	//
	// +optional
	// +kubebuilder:default={}
	OnResume OnResumeConfig `json:"onResume,omitempty"`
}

+kubebuilder:validation:XValidation:rule="(has(self.onPause) ? self.onPause : 'Full') == 'Full' || (has(self.onCommit) ? self.onCommit : 'Full') == (has(self.onPause) ? self.onPause : 'Full')",message="onCommit must be a subset of onPause"

func (*SnapshotsConfig) DeepCopy

func (in *SnapshotsConfig) DeepCopy() *SnapshotsConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotsConfig.

func (*SnapshotsConfig) DeepCopyInto

func (in *SnapshotsConfig) DeepCopyInto(out *SnapshotsConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Volume

type Volume struct {
	// name of the volume.
	//
	// +required
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:XValidation:rule="!format.dns1123Label().validate(self).hasValue()",message="Name must be a valid DNS label"
	Name string `json:"name"`

	// volumeSource represents the location and type of the mounted volume.
	VolumeSource `json:",inline"`
}

func (*Volume) DeepCopy

func (in *Volume) DeepCopy() *Volume

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.

func (*Volume) DeepCopyInto

func (in *Volume) DeepCopyInto(out *Volume)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolumeMount

type VolumeMount struct {
	// This must match the Name of a Volume.
	//
	// +required
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:XValidation:rule="!format.dns1123Label().validate(self).hasValue()",message="Name must be a valid DNS label"
	Name string `json:"name"`
	// Path within the actor at which the volume should be mounted. Must be a
	// clean absolute Unix path: must start with '/', not be '/', and contain
	// no ':', '..', '.', '//', trailing '/', or control characters.
	//
	// +required
	// +kubebuilder:validation:MaxLength=4096
	// +kubebuilder:validation:XValidation:rule="self.startsWith('/') && size(self) > 1 && !self.endsWith('/') && !self.contains('//') && !self.contains(':') && !self.matches('[\\x00-\\x1f\\x7f]') && !self.matches('(^|/)[.][.]?(/|$)')",message="MountPath must be a clean absolute Unix path: must start with '/', not be '/', and contain no ':', '..', '.', '//', trailing '/', or control characters"
	MountPath string `json:"mountPath"`
}

VolumeMount describes a mounting of a Volume within a actor.

func (*VolumeMount) DeepCopy

func (in *VolumeMount) DeepCopy() *VolumeMount

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMount.

func (*VolumeMount) DeepCopyInto

func (in *VolumeMount) DeepCopyInto(out *VolumeMount)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VolumeSource

type VolumeSource struct {
	// durableDir represents a durable directory on rootfs that persists across
	// resumes and participates in snapshots.
	// +optional
	DurableDir *DurableDirVolumeSource `json:"durableDir,omitempty"`

	// externalVolumeTemplate represents an external volume dynamically provisioned
	// for each actor. The volume only lives as long as the actor and is deleted
	// when the actor is deleted.
	// +optional
	ExternalVolumeTemplate *ExternalVolumeTemplate `json:"externalVolumeTemplate,omitempty"`
}

Represents the source of a volume to mount. Exactly one of its members must be specified.

When adding a new source type, list it in the ExactlyOneOf marker below.

+kubebuilder:validation:ExactlyOneOf={durableDir,externalVolumeTemplate}

func (*VolumeSource) DeepCopy

func (in *VolumeSource) DeepCopy() *VolumeSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSource.

func (*VolumeSource) DeepCopyInto

func (in *VolumeSource) DeepCopyInto(out *VolumeSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkerPool

type WorkerPool struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// spec defines the desired state of WorkerPool
	// +required
	Spec WorkerPoolSpec `json:"spec"`

	// status is the observed state of WorkerPool
	// +optional
	Status WorkerPoolStatus `json:"status,omitempty"`
}

WorkerPool is the Schema for the workerpools API +genclient +kubebuilder:object:generate=true +kubebuilder:object:root=true +kubebuilder:resource:scope=Namespaced,shortName=workerpool +kubebuilder:subresource:status +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector +kubebuilder:printcolumn:name="Desired",type=integer,JSONPath=`.spec.replicas` +kubebuilder:printcolumn:name="Replicas",type=integer,JSONPath=`.status.replicas` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

func (*WorkerPool) DeepCopy

func (in *WorkerPool) DeepCopy() *WorkerPool

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerPool.

func (*WorkerPool) DeepCopyInto

func (in *WorkerPool) DeepCopyInto(out *WorkerPool)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkerPool) DeepCopyObject

func (in *WorkerPool) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkerPoolList

type WorkerPoolList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []WorkerPool `json:"items"`
}

WorkerPoolList contains a list of WorkerPools. +kubebuilder:object:generate=true +kubebuilder:object:root=true

func (*WorkerPoolList) DeepCopy

func (in *WorkerPoolList) DeepCopy() *WorkerPoolList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerPoolList.

func (*WorkerPoolList) DeepCopyInto

func (in *WorkerPoolList) DeepCopyInto(out *WorkerPoolList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkerPoolList) DeepCopyObject

func (in *WorkerPoolList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkerPoolPodTemplate

type WorkerPoolPodTemplate struct {
	// NodeSelector is a selector which must be true for the pod to fit on a node.
	//
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Tolerations for the worker pods.
	//
	// +optional
	// +kubebuilder:validation:MaxItems=16
	// +listType=atomic
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// PriorityClassName for the worker pods.
	//
	// +optional
	PriorityClassName string `json:"priorityClassName,omitempty"`

	// NodeAffinity scheduling rules for the worker pods. Mapped to
	// spec.affinity.nodeAffinity on the pod.
	//
	// +optional
	NodeAffinity *corev1.NodeAffinity `json:"nodeAffinity,omitempty"`

	// Resources are the compute resources allocated for each worker pod.
	//
	// +optional
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
}

WorkerPoolPodTemplate defines optional scheduling and resource settings for worker pods. NodeAffinity is mapped to spec.affinity.nodeAffinity on the pod.

func (*WorkerPoolPodTemplate) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerPoolPodTemplate.

func (*WorkerPoolPodTemplate) DeepCopyInto

func (in *WorkerPoolPodTemplate) DeepCopyInto(out *WorkerPoolPodTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkerPoolSpec

type WorkerPoolSpec struct {
	// Replicas is the number of worker pods to run.
	// +required
	// +kubebuilder:validation:Minimum=0
	Replicas int32 `json:"replicas"`

	// AteomImage is the ateom container image to deploy as workers.
	// +kubebuilder:validation:MinLength=1
	// +required
	AteomImage string `json:"ateomImage"`

	// Template holds optional pod scheduling and resource settings for worker pods.
	//
	// +optional
	Template *WorkerPoolPodTemplate `json:"template,omitempty"`

	// SandboxClass selects the sandbox runtime family for this pool, which drives
	// the worker pod shape (KVM/vhost device mounts and node placement) and which
	// SandboxConfigs are eligible. The concrete binary is still selected by
	// AteomImage. Defaults to gvisor.
	//
	// See Also: TODOs in ActorTemplate SandboxClass
	//
	// +optional
	// +kubebuilder:validation:Enum=gvisor;microvm
	// +kubebuilder:default=gvisor
	SandboxClass SandboxClass `json:"sandboxClass,omitempty"`

	// SandboxConfigName names a cluster-scoped SandboxConfig to use for fetching
	// sandbox binaries. It overrides the cluster-wide default SandboxConfig for
	// this pool's SandboxClass. The referenced config's SandboxClass must match
	// this pool's SandboxClass. If empty, the default SandboxConfig for the
	// SandboxClass is used.
	// +optional
	SandboxConfigName string `json:"sandboxConfigName,omitempty"`
}

func (*WorkerPoolSpec) DeepCopy

func (in *WorkerPoolSpec) DeepCopy() *WorkerPoolSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerPoolSpec.

func (*WorkerPoolSpec) DeepCopyInto

func (in *WorkerPoolSpec) DeepCopyInto(out *WorkerPoolSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkerPoolStatus

type WorkerPoolStatus struct {
	// Replicas is the total number of worker pods.
	// +kubebuilder:validation:Minimum=0
	// +optional
	Replicas int32 `json:"replicas"`

	// Selector is the label selector for the worker pods.
	// +optional
	Selector string `json:"selector,omitempty"`
}

func (*WorkerPoolStatus) DeepCopy

func (in *WorkerPoolStatus) DeepCopy() *WorkerPoolStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerPoolStatus.

func (*WorkerPoolStatus) DeepCopyInto

func (in *WorkerPoolStatus) DeepCopyInto(out *WorkerPoolStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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