Skip to content

spec.deployment

Where and how the agent ships in production. Pick a target with type, then configure the matching sub-block.

yaml
spec:
  deployment:
    type: kubernetes
    kubernetes:
      image:
        registry: ghcr.io
        repository: company/customer-support-agent
        tag: v1.0.0

Fields

FieldTypeRequiredDescription
typestringenum: kubernetes, cloudrun. Selects the deployment target.
kubernetesobjectSee Kubernetes.
cloudrunobjectSee Cloud Run.

Kubernetes

yaml
spec:
  deployment:
    type: kubernetes
    kubernetes:
      image:
        registry: ghcr.io
        repository: company/customer-support-agent
        tag: v1.0.0
FieldDescription
imageSee Image.

The Kubernetes block is intentionally minimal in v1 - it carries the image and leaves the rest (Deployment, Service, ConfigMap, …) to the generator's templating. Future minor versions may add typed slots for replica counts and resource limits as common patterns harden.

Cloud Run

yaml
spec:
  deployment:
    type: cloudrun
    cloudrun:
      image:
        registry: us-central1-docker.pkg.dev
        repository: my-project/agents/customer-support
        tag: v1.0.0
        useCloudBuild: true
      resources:
        cpu: "1"
        memory: 512Mi
      scaling:
        minInstances: 1
        maxInstances: 10
        concurrency: 80
      service:
        timeout: 300
        allowUnauthenticated: false
        serviceAccount: [email protected]
        executionEnvironment: gen2
      environment:
        LOG_LEVEL: info
        CACHE_TTL: "300"
FieldReference
imageImage
resourcesResources
scalingScaling
serviceService
environment{ [key: string]: string } - env vars.

environment is injected into the running service and commonly carries both configuration and secrets. Never inline a real secret here - reference it with a ${VAR} placeholder and let your deploy pipeline supply the value. See Secrets & interpolation. (The kubernetes target has no environment map of its own; the generator's templating owns the Deployment's env / envFrom.)

Resources

FieldTypeDescription
cpustringCPU allocation per instance (e.g. "1").
memorystringMemory per instance (e.g. 512Mi, 2Gi).

Scaling

FieldTypeDescription
minInstancesintegerMinimum number of instances kept warm.
maxInstancesintegerCap on instances Cloud Run may spin up.
concurrencyintegerConcurrent requests served per instance.

Service

FieldTypeDescription
timeoutintegerPer-request timeout in seconds.
allowUnauthenticatedbooleanIf true, the service is publicly invokable.
serviceAccountstringGCP service-account email the service runs as.
executionEnvironmentstringCloud Run execution environment (e.g. gen1, gen2).

Image

Used by both the kubernetes and cloudrun sub-blocks.

FieldTypeDescription
registrystringImage registry (e.g. ghcr.io).
repositorystringImage repository within the registry.
tagstringImage tag.
useCloudBuildbooleanIf true, the generator wires in Google Cloud Build for image production. Most useful with type: cloudrun.