ActorTemplate
ate.dev / v1alpha1
apiVersion: ate.dev/v1alpha1
kind: ActorTemplate
metadata:
name: example
apiVersion
string
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
kind
string
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata
object
spec object required
spec defines the desired state of ActorTemplate. This field is immutable.
containers []object
Containers is the workload definition.
maxItems:
10
args
[]string
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.
maxItems:
64
command
[]string
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.
maxItems:
64env []object
Environment variables to set in the worker replicas.
maxItems:
32
name
string required
Name is the name of the environment variable. May be any printable ASCII
character except '='.
pattern:
^[ -<>-~]+$minLength:
1
value
string required
Value is the literal value of the environment variable. Unlike in
Kubernetes pods, this value is not interpolated, and $(VAR)
references are not expanded.
minLength:
0
image
string required
Image to use for the worker replicas.
name
string required
Name of the container.
maxLength:
63readyz object
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.
httpGet object required
HTTPGet specifies the HTTP request to perform against the container.
path
string
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.
pattern:
^/([A-Za-z0-9\-._~!$&'()*+,;=:@/]|%[0-9A-Fa-f]{2})*$maxLength:
1024
port
integer required
Port to access on the container.
format:
int32minimum:
1maximum:
65535
timeoutSeconds
integer
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.
format:
int32minimum:
1maximum:
3600volumeMounts []object
volumeMounts define the volumes to mount into this container.
maxItems:
32
mountPath
string required
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.
maxLength:
4096
name
string required
This must match the Name of a Volume.
maxLength:
63
sandboxClass
string
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.
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
enum:
gvisor, microvmsnapshotsConfig object required
Snapshots configuration for the actor.
location
string required
Location is the base object-storage URI snapshots of this template's
actors are stored under.
minLength:
1
onCommit
string
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".
enum:
Full, Data
onPause
string
OnPause specifies what to include in the snapshot when the actor is paused.
If not provided, the "Full" behavior is used by default.
enum:
Full, DataonResume object
OnResume specifies, per snapshot situation, what supplies the guest
state at resume (see OnResumeConfig). "fromData: Golden" requires
sandboxClass "microvm".
fromData
string
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".
enum:
ColdBoot, Goldenvolumes []object
Volumes defines the volumes to mount into all containers in the actor.
maxItems:
32
durableDir
object
durableDir represents a durable directory on rootfs that persists across
resumes and participates in snapshots.
externalVolumeTemplate object
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.
capacity
string | integer required
capacity specifies the size of the volume to create.
string pattern:
^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
storageClassName
string required
storageClassName refers to the StorageClass to create the volume from.
name
string required
name of the volume.
maxLength:
63workerSelector object
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.
matchExpressions []object
matchExpressions is a list of label selector requirements. The requirements are ANDed.
key
string required
key is the label key that the selector applies to.
operator
string required
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
values
[]string
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
matchLabels
object
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
status object
status is the observed state of ActorTemplate
conditions []object
conditions defines the status conditions array
lastTransitionTime
string required
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format:
date-time
message
string required
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength:
32768
observedGeneration
integer
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format:
int64minimum:
0
reason
string required
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
pattern:
^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$minLength:
1maxLength:
1024
status
string required
status of the condition, one of True, False, Unknown.
enum:
True, False, Unknown
type
string required
type of condition in CamelCase or in foo.example.com/CamelCase.
pattern:
^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$maxLength:
316
goldenActorID
string
goldenSnapshot
string
phase
string
Phase of the actor template.
takeGoldenSnapshotAt
string
format:
date-timeNo matches. Try .spec.containers for an exact path