v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 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

View Source
const (
	// WorkerPoolSandboxClassConditionResolved is True when the sandbox
	// class's spec resolves to a usable SandboxConfig. While it is False for
	// any class, the controller applies the worker Deployment only if one
	// already exists or every class has a config in use.
	WorkerPoolSandboxClassConditionResolved = "Resolved"

	// WorkerPoolReasonResolved: the sandbox class resolved.
	WorkerPoolReasonResolved = "Resolved"
	// WorkerPoolReasonSandboxConfigNotFound: configRef names a SandboxConfig
	// that does not exist.
	WorkerPoolReasonSandboxConfigNotFound = "SandboxConfigNotFound"
	// WorkerPoolReasonSandboxConfigDeleting: the SandboxConfig configRef
	// names, or the only class default, is being deleted. This is reported
	// whether or not the pool already uses it.
	WorkerPoolReasonSandboxConfigDeleting = "SandboxConfigDeleting"
	// WorkerPoolReasonSandboxClassMismatch: configRef names a SandboxConfig
	// of another sandbox class.
	WorkerPoolReasonSandboxClassMismatch = "SandboxClassMismatch"
	// WorkerPoolReasonDefaultConfigNotFound: configRef is omitted and no
	// SandboxConfig of the class is annotated as the class default.
	WorkerPoolReasonDefaultConfigNotFound = "DefaultConfigNotFound"
)
View Source
const SandboxConfigClassDefaultAnnotation = "sandboxconfig.ate.dev/is-class-default"

SandboxConfigClassDefaultAnnotation marks a SandboxConfig as a default for its sandboxClass when set to "true". More than one SandboxConfig of the same class may carry it; the newest one wins.

View Source
const SandboxConfigWorkerPoolProtectionFinalizer = "sandboxconfig.ate.dev/workerpool-protection"

SandboxConfigWorkerPoolProtectionFinalizer is put on a SandboxConfig by atecontroller before any WorkerPool's status records it. It stays until the config is deleted. Deleting a config that carries it goes in three steps:

  1. The delete only sets deletionTimestamp, because the finalizer list is not empty. The config stays, Terminating.
  2. atecontroller checks whether any WorkerPool's status.sandboxClasses names the config, in configRef or pendingConfigRef. If one does, it leaves the finalizer and checks again whenever a WorkerPool changes. Once none does, it removes the finalizer.
  3. With the finalizer list empty, the API server deletes the config.

Without atecontroller, step 2 never happens and the config stays Terminating until someone clears the finalizer by hand. A config no pool has ever used carries no finalizer and deletes at once.

A pool that switches to a config names it in pendingConfigRef first. Then atecontroller reads the config from the API server, and moves configRef to it only if that read finds it is not being deleted. So a config is never released while a pool's configRef names it.

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 AssetFile

type AssetFile struct {
	// URL is where to download the asset from (e.g. a gs:// URL). atelet
	// fetches every URL through the node's object-store plugin, with the
	// plugin's credentials. The plugin refuses URLs under a snapshot location.
	// The in-tree plugin serves only its storage backend's scheme: gs:// on
	// GCS, s3:// on S3. A gs:// URL the plugin has no object for or cannot
	// serve is then read anonymously, which serves public buckets such as
	// gs://gvisor.
	//
	// +required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=2048
	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 CSIDriverConfig

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

	Spec CSIDriverConfigSpec `json:"spec"`
}

CSIDriverConfig is the Schema for the csidriverconfigs API

+genclient +genclient:nonNamespaced +kubebuilder:object:generate=true +kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster,shortName=csidriverconfig +kubebuilder:printcolumn:name="Driver",type=string,JSONPath=`.spec.driverName` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

func (*CSIDriverConfig) DeepCopy

func (in *CSIDriverConfig) DeepCopy() *CSIDriverConfig

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

func (*CSIDriverConfig) DeepCopyInto

func (in *CSIDriverConfig) DeepCopyInto(out *CSIDriverConfig)

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

func (*CSIDriverConfig) DeepCopyObject

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

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

type CSIDriverConfigList

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

CSIDriverConfigList contains a list of CSIDriverConfigs +kubebuilder:object:generate=true +kubebuilder:object:root=true

func (*CSIDriverConfigList) DeepCopy

func (in *CSIDriverConfigList) DeepCopy() *CSIDriverConfigList

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

func (*CSIDriverConfigList) DeepCopyInto

func (in *CSIDriverConfigList) DeepCopyInto(out *CSIDriverConfigList)

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

func (*CSIDriverConfigList) DeepCopyObject

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

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

type CSIDriverConfigSpec

type CSIDriverConfigSpec struct {
	// DriverName is the standard CSI driver name (e.g. "hostpath.csi.k8s.io").
	// Matches the StorageClass referenced in ActorTemplate volume definitions.
	//
	// +required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=`^(substrate\.io/)?([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)$`
	DriverName string `json:"driverName"`

	// ControllerEndpoint is the gRPC endpoint for the CSI Controller service.
	// Must be a valid network URI (e.g. dns:///csi-service:9000 or tcp://127.0.0.1:9000).
	// TODO: Harden endpoint validation to prevent invalid or unsafe URI inputs.
	//
	// +required
	// +kubebuilder:validation:Pattern=`^(tcp|dns)://.+$`
	ControllerEndpoint string `json:"controllerEndpoint"`

	// NodeSocketOverride is an optional override for the CSI Node service socket
	// on the worker nodes. If empty, ATE defaults to unix:///var/lib/kubelet/plugins/[DriverName]/csi.sock.
	//
	// +optional
	// +kubebuilder:validation:Pattern=`^unix://.+$`
	NodeSocketOverride string `json:"nodeSocketOverride,omitempty"`

	// TLS configures TLS/mTLS for the connection to the ControllerEndpoint.
	// +optional
	TLS *CSIDriverTLSConfig `json:"tls,omitempty"`
}

CSIDriverConfigSpec defines the desired state of CSIDriverConfig

func (*CSIDriverConfigSpec) DeepCopy

func (in *CSIDriverConfigSpec) DeepCopy() *CSIDriverConfigSpec

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

func (*CSIDriverConfigSpec) DeepCopyInto

func (in *CSIDriverConfigSpec) DeepCopyInto(out *CSIDriverConfigSpec)

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

type CSIDriverTLSConfig

type CSIDriverTLSConfig struct {
	// Enabled controls whether TLS is used.
	// +required
	Enabled bool `json:"enabled"`

	// TODO: Add alternative support for manual certs by adding SecretReference fields.
	// UsePodIdentity indicates whether to reuse Substrate's Pod Identity (SPIFFE) certificates.
	// +optional
	UsePodIdentity bool `json:"usePodIdentity,omitempty"`

	// ServerName specifies the expected server name (SAN) for TLS certificate verification.
	// Required when TLS is enabled.
	// +optional
	ServerName string `json:"serverName,omitempty"`
}

CSIDriverTLSConfig holds TLS and mTLS configuration for CSI driver connections. +kubebuilder:validation:XValidation:rule="!self.enabled || (has(self.usePodIdentity) && self.usePodIdentity)",message="tls.usePodIdentity must be true when tls.enabled is true; manual certificates are not yet supported" +kubebuilder:validation:XValidation:rule="!self.enabled || (has(self.serverName) && size(self.serverName) > 0)",message="tls.serverName is required when tls.enabled is true"

func (*CSIDriverTLSConfig) DeepCopy

func (in *CSIDriverTLSConfig) DeepCopy() *CSIDriverTLSConfig

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

func (*CSIDriverTLSConfig) DeepCopyInto

func (in *CSIDriverTLSConfig) DeepCopyInto(out *CSIDriverTLSConfig)

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

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 = sandboxclass.GVisor
	// SandboxClassMicroVM is the micro-VM runtime (cmd/ateom-microvm); needs
	// /dev/kvm and vhost devices.
	SandboxClassMicroVM SandboxClass = 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 versions of the sandbox binaries for a sandbox runtime family. It is referenced by an ActorTemplate's sandbox_config.config_name (required) and decouples sandbox binary selection from the workload definition.

+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=string,JSONPath=`.spec.defaultVersion` +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 SandboxConfigReference added in v0.5.0

type SandboxConfigReference struct {
	// Name is the SandboxConfig's metadata.name.
	//
	// +required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	Name string `json:"name,omitempty"`
}

SandboxConfigReference names a cluster-scoped SandboxConfig.

func (*SandboxConfigReference) DeepCopy added in v0.5.0

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

func (*SandboxConfigReference) DeepCopyInto added in v0.5.0

func (in *SandboxConfigReference) DeepCopyInto(out *SandboxConfigReference)

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

type SandboxConfigSpec

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

	// defaultVersion names the entry in versions that new sandboxes boot with.
	// It must name an existing, non-Disabled version.
	//
	// +required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	DefaultVersion string `json:"defaultVersion,omitempty"`

	// versions are the sandbox versions this config offers, keyed by name.
	//
	// +required
	// +listType=map
	// +listMapKey=name
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=16
	Versions []SandboxVersionConfig `json:"versions,omitempty"`
}

SandboxConfigSpec is the desired state of a SandboxConfig.

+kubebuilder:validation:XValidation:rule="self.versions.exists(v, v.name == self.defaultVersion)",message="defaultVersion must name an entry in versions" +kubebuilder:validation:XValidation:rule="!self.versions.exists(v, v.name == self.defaultVersion && has(v.state) && v.state == 'Disabled')",message="the version named by defaultVersion must not be Disabled" +kubebuilder:validation:XValidation:rule="self.sandboxClass == 'gvisor' ? self.versions.all(v, has(v.pauseImage) && size(v.pauseImage) > 0) : self.versions.all(v, !has(v.pauseImage) || size(v.pauseImage) == 0)",message="pauseImage is required on every version for gvisor and not allowed for other sandbox classes"

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.

func (*SandboxConfigSpec) DefaultVersionConfig added in v0.5.0

func (s *SandboxConfigSpec) DefaultVersionConfig() (*SandboxVersionConfig, bool)

DefaultVersionConfig returns the entry of Versions named by DefaultVersion, and whether one exists. A Disabled entry is never returned: the CRD rejects a Disabled default, so a spec that reads back that way is treated as having no default version.

type SandboxVersionConfig added in v0.5.0

type SandboxVersionConfig struct {
	// name identifies this version within its SandboxConfig. It is a DNS label
	// (lower-case alphanumerics and '-').
	//
	// +required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
	Name string `json:"name,omitempty"`

	// state is whether this version may be used: Enabled (default) or
	// Disabled.
	//
	// +optional
	// +kubebuilder:default=Enabled
	State *SandboxVersionState `json:"state,omitempty"`

	// PauseImage is the container image used as the root sandbox container.
	// It holds the sandbox's namespaces and runs no workload code, so it is an
	// implementation detail of the sandbox rather than something actor authors
	// choose. Required for gvisor; not allowed for microvm, which runs no pause
	// container. It is captured in the snapshot manifest alongside the sandbox
	// binaries, so a restore always re-creates the sandbox from the same image
	// the snapshot was taken with.
	//
	// 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
	//
	// +optional
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=512
	// +kubebuilder:validation:XValidation:rule="self.contains('@')",message="All images must include a digest"
	PauseImage string `json:"pauseImage,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.zstd, 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"`
}

SandboxVersionConfig is one version of a SandboxConfig: the exact pause image and asset set a sandbox boots with.

func (*SandboxVersionConfig) DeepCopy added in v0.5.0

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

func (*SandboxVersionConfig) DeepCopyInto added in v0.5.0

func (in *SandboxVersionConfig) DeepCopyInto(out *SandboxVersionConfig)

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

type SandboxVersionState added in v0.5.0

type SandboxVersionState string

SandboxVersionState is whether a SandboxConfig version may be used.

+kubebuilder:validation:Enum=Enabled;Disabled

const (
	// SandboxVersionStateEnabled marks a version as usable. Default.
	SandboxVersionStateEnabled SandboxVersionState = "Enabled"
	// SandboxVersionStateDisabled marks a version as unusable. The version
	// named by defaultVersion cannot be disabled.
	SandboxVersionStateDisabled SandboxVersionState = "Disabled"
)

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="Ready",type=integer,JSONPath=`.status.readyReplicas` +kubebuilder:printcolumn:name="SandboxConfig",type=string,JSONPath=`.status.sandboxClasses[*].configRef.name` +kubebuilder:printcolumn:name="Resolved",type=string,JSONPath=`.status.sandboxClasses[*].conditions[?(@.type=="Resolved")].status` +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 WorkerPoolLabelValue

type WorkerPoolLabelValue string

WorkerPoolLabelValue is a Kubernetes label value for generated worker workloads.

+kubebuilder:validation:MaxLength=63 +kubebuilder:validation:Pattern=`^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$`

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 {
	// Labels are added to the generated Deployment and worker pods. Keys in
	// the ate.dev domain and its subdomains are reserved for controllers.
	//
	// +optional
	// +kubebuilder:validation:MaxProperties=64
	// +kubebuilder:validation:XValidation:rule="self.all(key, !key.startsWith('ate.dev/') && !key.contains('.ate.dev/'))",message="ate.dev and its subdomains are reserved"
	// +kubebuilder:validation:XValidation:rule="self.all(key, !format.qualifiedName().validate(key).hasValue())",message="label keys must be valid Kubernetes qualified names"
	Labels map[string]WorkerPoolLabelValue `json:"labels,omitempty"`

	// Annotations are added to the generated Deployment and worker pods. Keys
	// in the ate.dev domain and its subdomains are reserved for controllers.
	//
	// +optional
	// +kubebuilder:validation:MaxProperties=64
	// +kubebuilder:validation:XValidation:rule="self.all(key, !key.startsWith('ate.dev/') && !key.contains('.ate.dev/'))",message="ate.dev and its subdomains are reserved"
	// +kubebuilder:validation:XValidation:rule="self.all(key, !format.qualifiedName().validate(key).hasValue())",message="annotation keys must be valid Kubernetes qualified names"
	Annotations map[string]string `json:"annotations,omitempty"`

	// 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"`

	// ServiceAccountName for the worker pods. The ServiceAccount must exist
	// in the WorkerPool's namespace. When omitted, the pods use the
	// namespace's default ServiceAccount.
	//
	// +optional
	// +kubebuilder:validation:MinLength=1
	ServiceAccountName *string `json:"serviceAccountName,omitempty"`
}

WorkerPoolPodTemplate defines optional metadata, scheduling, and resource settings for worker workloads. 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 WorkerPoolSandboxClass added in v0.5.0

type WorkerPoolSandboxClass struct {
	// Name selects the sandbox runtime family, which drives the worker pod
	// shape (KVM/vhost device mounts and node placement). The concrete binary
	// is still selected by WorkerImage. The sandbox binaries themselves come
	// from the SandboxConfig each ActorTemplate names (required).
	//
	// See Also: TODOs in ActorTemplate SandboxClass
	//
	// +required
	// +kubebuilder:validation:Enum=gvisor;microvm
	Name SandboxClass `json:"name,omitempty"`

	// ConfigRef names a cluster-scoped SandboxConfig for this sandbox class.
	// The referenced config's SandboxClass must match Name. When omitted, the
	// pool uses the newest SandboxConfig of this class annotated
	// sandboxconfig.ate.dev/is-class-default: "true". The controller reports
	// the resolved config in status.sandboxClasses.
	//
	// +optional
	ConfigRef *SandboxConfigReference `json:"configRef,omitempty"`
}

WorkerPoolSandboxClass is one sandbox runtime family a WorkerPool runs.

func (*WorkerPoolSandboxClass) DeepCopy added in v0.5.0

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

func (*WorkerPoolSandboxClass) DeepCopyInto added in v0.5.0

func (in *WorkerPoolSandboxClass) DeepCopyInto(out *WorkerPoolSandboxClass)

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

type WorkerPoolSandboxClassStatus added in v0.5.0

type WorkerPoolSandboxClassStatus struct {
	// Name is the sandbox runtime family.
	//
	// +required
	// +kubebuilder:validation:Enum=gvisor;microvm
	Name SandboxClass `json:"name,omitempty"`

	// ConfigRef names the cluster-scoped SandboxConfig in use. That is the
	// config spec.sandboxClasses[].configRef names, or the class default, or
	// the last resolved config while the spec does not resolve. Omitted when
	// the class has never resolved.
	//
	// +optional
	ConfigRef *SandboxConfigReference `json:"configRef,omitempty"`

	// PendingConfigRef names the SandboxConfig the class is switching to
	// while the controller confirms it against the API server. It protects
	// the config from deletion like configRef does. The same reconcile
	// clears it, and configRef either moves to it or stays where it was.
	//
	// +optional
	PendingConfigRef *SandboxConfigReference `json:"pendingConfigRef,omitempty"`

	// Conditions describe the current state of this sandbox class.
	//
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

WorkerPoolSandboxClassStatus reports the SandboxConfig and resolution state of one sandbox class of a WorkerPool.

func (*WorkerPoolSandboxClassStatus) DeepCopy added in v0.5.0

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

func (*WorkerPoolSandboxClassStatus) DeepCopyInto added in v0.5.0

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"`

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

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

	// SandboxClasses lists the sandbox runtime families this pool runs. Exactly
	// one entry is allowed today. The names cannot change after creation.
	//
	// +required
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=1
	// +kubebuilder:validation:XValidation:rule="self.map(c, c.name) == oldSelf.map(c, c.name)",message="sandboxClasses names are immutable"
	// +listType=map
	// +listMapKey=name
	SandboxClasses []WorkerPoolSandboxClass `json:"sandboxClasses,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.

func (*WorkerPoolSpec) DefaultSandboxClass added in v0.5.0

func (s *WorkerPoolSpec) DefaultSandboxClass() SandboxClass

DefaultSandboxClass returns the sandbox class of the pool's first SandboxClasses entry, or "" if there is none. Currently SandboxClasses is always a list of length 1.

type WorkerPoolStatus

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

	// ReadyReplicas is the number of ready worker pods.
	// +kubebuilder:validation:Minimum=0
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

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

	// SandboxClasses reports the SandboxConfig each sandbox class of the pool
	// uses and whether the class's spec resolves.
	//
	// +optional
	// +kubebuilder:validation:MaxItems=1
	// +listType=map
	// +listMapKey=name
	SandboxClasses []WorkerPoolSandboxClassStatus `json:"sandboxClasses,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