Skip to content

Add ActorTemplate and ActorTemplateVersion as substrate resources - #822

Closed
Zoe Zhao (zoez7) wants to merge 1 commit into
agent-substrate:mainfrom
zoez7:atv-br-1
Closed

Add ActorTemplate and ActorTemplateVersion as substrate resources#822
Zoe Zhao (zoez7) wants to merge 1 commit into
agent-substrate:mainfrom
zoez7:atv-br-1

Conversation

@zoez7

@zoez7 Zoe Zhao (zoez7) commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Part of #477 . Adding both AT and ATV as global resources in substrate.

All ATV fields are immutable. SandboxConifg will be frozen into ATV at creation time.

  • Tests pass
  • Appropriate changes to documentation are included in the PR.

Not yet, will add documentation once we cut over from the the current CRD impl.

Demo: what the counter demo will look like with AT and ATV:

apiVersion: api.ate.dev/v1alpha1
kind: ActorTemplate
metadata:
  name: counter-atv
spec:
  workerSelector:
    matchLabels:
      workload: counter
  defaultVersionOnCreate:
    name: counter-atv-v1
---
apiVersion: api.ate.dev/v1alpha1
kind: ActorTemplateVersion
metadata:
  name: counter-atv-v1
actorTemplate:
  name: counter-atv
spec:
  pauseImage: "registry.k8s.io/pause:3.10.2@sha256:f548e0e8e3dc1896ca956272154dde3314e8cc4fde0a57577ee9fa1c63f5baf4"
  containers:
  - name: counter
    image: ko://github.com/agent-substrate/substrate/demos/counter
    command:
    - /ko-app/counter
    env:
    - name: VERSION
      value: v1
    readyz:
      httpGet:
        path: /readyz
        port: 80
    volumeMounts:
    - name: data
      mountPath: /home/counter
  volumes:
  - name: data
    durableDir: {}
  snapshotsConfig:
    onPause: SNAPSHOT_CONTENT_SCOPE_FULL
    onCommit: SNAPSHOT_CONTENT_SCOPE_DATA
    storageLocation: gs://${BUCKET_NAME}/ate-demo-counter-atv/
  sandboxConfig:
    sandboxClass: SANDBOX_CLASS_GVISOR
    configName: gvisor-default
---

…ne proto

Introduce ActorTemplate (identity + placement policy) and
ActorTemplateVersion (immutable workload definition), along with the
supporting SandboxClass/SandboxConfig, SnapshotsConfig, ResumeSource,
and OnResumeConfig messages.

The version status State enum mirrors the existing ActorTemplateVersion
CRD PhaseType (RESUME_GOLDEN_ACTOR -> WAIT_GOLDEN_ACTOR ->
{READY | FAILED}, with UNSPECIFIED for the initial empty phase).
ActorTemplateSpec spec = 2;
}

message ActorTemplateSpec {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline ActorTemplateSpec will be flatten into ActorTemplate.

@zoez7

Copy link
Copy Markdown
Collaborator Author

I tried to stack PR reviews on top of each other, and failed. Closing this PR. Will use #824 to review these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants