Skip to main content
← Back to list
01Issue
FeatureClosedSwamp Club
AssigneesNone

Support --global-arg on model create

Opened by swampadmin · 9/10/2025

Problem

When creating a model instance with swamp model create, there is no way to pass global arguments inline. Users must create the model and then manually edit the definition YAML to set globalArguments.

Current workflow:

swamp model create @bixu/kubevirt-vm dev-vms --json
# Then manually edit models/@bixu/kubevirt-vm/<uuid>.yaml to set globalArguments

Desired workflow:

swamp model create @bixu/kubevirt-vm dev-vms   --global-arg kubeContext=dev-harvester   --global-arg namespace=cicd   --json

Proposed Solution

Add a --global-arg key=value (repeatable) flag to swamp model create that populates the globalArguments map in the generated definition YAML.

Changes needed in:

  • Command option parsing for model create
  • Definition YAML generation to merge provided global args
  • Validation against the model type's globalArguments Zod schema before writing

Alternatives

  • Users manually edit the YAML after creation (current workaround, works but tedious)
  • A separate swamp model set-global-arg <name> key=value command (more granular but adds another command)
02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.