rpk ai sandbox-template apply
Reconcile sandbox templates from one or more YAML manifests.
For each manifest: create the resource if absent, otherwise update every field that differs from the live resource. A manifest is the COMPLETE desired state, so a field you omit is not left alone - it is compared against the value a create from that manifest would have produced, and reconciled to it. Lists, maps and oneof variants replace wholesale. Fields that can only be set at creation time are immutable; changing one is an error.
Manifests round-trip with get -o yaml for this resource, which is how to
start from a complete one. Pass -f - to read stdin.
This does not delete resources absent from the manifests (no prune); see
diff --help.
A manifest names the template by its full resource name,
sandboxTemplates/<id>. Write the image and resources of its revision at the
top level, or under latest_revision as get -o yaml prints them: both mean
the same.
A template’s image and resources live in immutable revisions. Changing the image or any resource limit does not change a revision: apply creates the next one, and diff says so. The revision is prepared in the background and serves new sandboxes once it is READY; sandboxes made earlier keep theirs. Display name, description, tags, idle_timeout and at_rest_retention change in place. Leave out idle_timeout to keep the stored one; leave out at_rest_retention to keep sandboxes forever; omit image for the default image.
sandboxTemplates/default belongs to the platform and cannot be changed.
Examples
This section provides examples of how to use rpk ai sandbox-template apply.
python.yaml
name: sandboxTemplates/python
display_name: Python
idle_timeout: 1800s
image: docker.io/library/python@sha256:<digest>
resources:
cpu_millicores: 500
memory_bytes: 536870912
rpk ai sandbox-template diff -f python.yaml
rpk ai sandbox-template apply -f python.yaml
Flags
| Value | Type | Description |
|---|---|---|
|
strings |
manifest file, directory, or - for stdin ( |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |