Skip to content Skip to content

API Reference

Package v1alpha1 contains API Schema definitions for the openclaw v1alpha1 API group

AdditionalWorkspace defines a named workspace for a secondary agent. The operator seeds files to ~/.openclaw/workspace-/.

Appears in:

FieldDescriptionDefaultValidation
name stringName identifies this workspace. The operator seeds files to
~/.openclaw/workspace-/. Must match the workspace path
configured in spec.config.raw.agents.list[].workspace.
MaxLength: 63
MinLength: 1
Pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
configMapRef ConfigMapNameSelectorConfigMapRef references an external ConfigMap whose keys become workspace files.Optional: {}
initialFiles object (keys:string, values:string)InitialFiles maps filenames to their content (same as spec.workspace.initialFiles).MaxProperties: 50
Optional: {}
initialDirectories string arrayInitialDirectories is a list of directories to create inside this workspace.MaxItems: 20
Optional: {}

AutoScalingSpec configures horizontal pod auto-scaling via HPA

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables HorizontalPodAutoscaler creationfalseOptional: {}
minReplicas integerMinReplicas is the lower limit for the number of replicas1Minimum: 1
Optional: {}
maxReplicas integerMaxReplicas is the upper limit for the number of replicas5Minimum: 1
Optional: {}
targetCPUUtilization integerTargetCPUUtilization is the target average CPU utilization (percentage)80Maximum: 100
Minimum: 1
Optional: {}
targetMemoryUtilization integerTargetMemoryUtilization is the target average memory utilization (percentage).
When not set, only CPU-based scaling is used.
Maximum: 100
Minimum: 1
Optional: {}

AutoUpdateSpec configures automatic version updates from the OCI registry

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables automatic version updatesfalseOptional: {}
checkInterval stringCheckInterval is how often to check for new versions (Go duration, e.g. “24h”)
Minimum: 1h, Maximum: 168h (7 days)
24hOptional: {}
backupBeforeUpdate booleanBackupBeforeUpdate creates a backup before applying updatestrueOptional: {}
rollbackOnFailure booleanRollbackOnFailure automatically reverts to the previous version if the
updated pod fails to become ready within HealthCheckTimeout
trueOptional: {}
healthCheckTimeout stringHealthCheckTimeout is how long to wait for the updated pod to become ready
before triggering a rollback (Go duration, e.g. “10m”)
Minimum: 2m, Maximum: 30m
10mOptional: {}

AvailabilitySpec defines high availability settings

Appears in:

FieldDescriptionDefaultValidation
podDisruptionBudget PodDisruptionBudgetSpecPodDisruptionBudget configures the PDBOptional: {}
autoScaling AutoScalingSpecAutoScaling configures horizontal pod auto-scalingOptional: {}
nodeSelector object (keys:string, values:string)NodeSelector is a selector which must match a node’s labels for the pod to be scheduledOptional: {}
tolerations Toleration arrayTolerations are tolerations for pod schedulingOptional: {}
affinity AffinityAffinity specifies affinity scheduling rulesOptional: {}
topologySpreadConstraints TopologySpreadConstraint arrayTopologySpreadConstraints describes how pods should spread across topology domainsOptional: {}
runtimeClassName stringRuntimeClassName refers to a RuntimeClass object in the cluster,
which should be used to run this pod.
If no RuntimeClass resource matches the named class, the pod will not be run.
If unset or empty, the default container runtime is used.
More info: https://kubernetes.io/docs/concepts/containers/runtime-class/
Optional: {}

BackupSpec configures periodic scheduled backups to S3-compatible storage.

Appears in:

FieldDescriptionDefaultValidation
schedule stringSchedule is a cron expression for periodic backups (e.g., “0 2 * * *” for daily at 2 AM).
When set, the operator creates a CronJob that runs rclone to sync PVC data to S3.
Requires persistence to be enabled and the s3-backup-credentials Secret
in the operator namespace.
Optional: {}
historyLimit integerHistoryLimit is the number of successful CronJob runs to retain.3Minimum: 0
Optional: {}
failedHistoryLimit integerFailedHistoryLimit is the number of failed CronJob runs to retain.1Minimum: 0
Optional: {}
timeout stringTimeout is the maximum duration to wait for a pre-delete backup to complete
before giving up and proceeding with deletion (Go duration string, e.g. “30m”, “1h”).
Covers all phases: StatefulSet scale-down, pod termination, Job execution, and
Job failure retries. When the timeout elapses the operator logs a warning,
emits a BackupTimedOut event, and removes the finalizer so deletion can proceed.
Minimum: 5m, Maximum: 24h, Default: 30m.
Optional: {}
serviceAccountName stringServiceAccountName is the name of the ServiceAccount to use for backup and restore Jobs.
Use this to assign a cloud-provider workload identity ServiceAccount (e.g., AWS IRSA,
GKE Workload Identity, AKS Workload Identity) so backup Jobs can authenticate to the
storage backend without static credentials.
When set, all backup Jobs (pre-delete, pre-update, periodic, and restore) use this SA.
Optional: {}
retentionDays integerRetentionDays is the number of days to keep daily snapshots in S3.
The periodic backup syncs incrementally to a fixed “latest” path and
takes a daily snapshot. Snapshots older than RetentionDays are pruned
after each successful backup.
7Maximum: 365
Minimum: 1
Optional: {}

BootstrapSpec controls the operator-managed BOOTSTRAP.md workspace file.

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled controls whether the operator injects its BOOTSTRAP.md into the
default workspace. When true (the default), the init container seeds
BOOTSTRAP.md on pod start if the file is not present on the PVC.
Set to false if the agent has already completed bootstrap and you don’t
want the operator to recreate the file on pod restart or config change.
OpenClaw deletes BOOTSTRAP.md after applying it, so without this flag
every restart would cause the agent to re-run bootstrap. See #463.
trueOptional: {}

CABundleSpec configures custom CA certificate injection.

Appears in:

FieldDescriptionDefaultValidation
configMapName stringConfigMapName is the name of a ConfigMap containing the CA bundle.
The ConfigMap should have a key matching the Key field.
Optional: {}
secretName stringSecretName is the name of a Secret containing the CA bundle.
The Secret should have a key matching the Key field.
Only one of ConfigMapName or SecretName should be set.
Optional: {}
key stringKey is the key in the ConfigMap or Secret containing the CA bundle.ca-bundle.crtOptional: {}

ChromiumImageSpec defines the Chromium container image

Appears in:

FieldDescriptionDefaultValidation
repository stringRepository is the container image repositorychromedp/headless-shellOptional: {}
tag stringTag is the container image tagstableOptional: {}
digest stringDigest is the container image digest for supply chain securityOptional: {}

ChromiumPersistenceSpec configures persistent storage for Chromium browser profiles

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables persistent storage for the Chromium browser profile.
When true, a PVC is created (or an existing one is used) and mounted at
/chromium-data. The —user-data-dir flag is set automatically so that
cookies, localStorage, session tokens, and cached credentials survive
pod restarts.
falseOptional: {}
storageClass stringStorageClass is the name of the StorageClass to use for the PVC.
If empty, the cluster default StorageClass is used.
Optional: {}
size stringSize is the requested storage size for the Chromium profile PVC.1GiOptional: {}
existingClaim stringExistingClaim is the name of a pre-existing PVC to use instead of
creating a new one. When set, storageClass and size are ignored.
Optional: {}

ChromiumSpec defines the Chromium sidecar configuration

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables the Chromium sidecar for browser automationfalseOptional: {}
image ChromiumImageSpecImage configures the Chromium container imageOptional: {}
resources ResourcesSpecResources specifies compute resources for the Chromium containerOptional: {}
persistence ChromiumPersistenceSpecPersistence configures persistent storage for the Chromium browser profile.
When enabled, browser state (cookies, localStorage, session tokens) survives
pod restarts. When disabled (default), an emptyDir is used and all browser
state is lost on restart.
Optional: {}
extraArgs string arrayExtraArgs specifies additional command-line arguments passed to the
Chromium process. These are appended to the default arguments.
Example: [“—disable-blink-features=AutomationControlled”, “—user-agent=Mozilla/5.0 …”]
Optional: {}
extraEnv EnvVar arrayExtraEnv specifies additional environment variables for the Chromium
sidecar container, merged with the operator-managed variables.
Optional: {}

ConfigMapKeySelector selects a key from a ConfigMap

Appears in:

FieldDescriptionDefaultValidation
name stringName of the ConfigMap
key stringKey in the ConfigMap to useopenclaw.jsonOptional: {}

ConfigMapNameSelector references a ConfigMap by name. Unlike ConfigMapKeySelector, all keys in the ConfigMap are used.

Appears in:

FieldDescriptionDefaultValidation
name stringName is the name of the ConfigMap to reference.MinLength: 1

ConfigSpec defines the OpenClaw configuration

Appears in:

FieldDescriptionDefaultValidation
configMapRef ConfigMapKeySelectorConfigMapRef references a ConfigMap containing the openclaw.json configurationOptional: {}
raw RawConfigRaw is inline openclaw.json configuration (used if ConfigMapRef is not set)Optional: {}
mergeMode stringMergeMode controls how operator-managed config is applied to the PVC.
”overwrite” replaces the config file on every pod restart.
”merge” deep-merges operator config with existing PVC config, preserving runtime changes.
overwriteEnum: [overwrite merge]
Optional: {}
format stringFormat specifies the config file format.
”json” (default) expects standard JSON. “json5” accepts JSON5 (comments, trailing commas).
JSON5 is converted to standard JSON by the init container using npx json5.
JSON5 requires configMapRef (inline raw config must be valid JSON).
jsonEnum: [json json5]
Optional: {}

ContainerSecurityContextSpec defines container-level security context

Appears in:

FieldDescriptionDefaultValidation
allowPrivilegeEscalation booleanAllowPrivilegeEscalation controls whether a process can gain more privilegesfalseOptional: {}
readOnlyRootFilesystem booleanReadOnlyRootFilesystem mounts the container’s root filesystem as read-only
The PVC at ~/.openclaw/ provides writable home, and a /tmp emptyDir handles temp files
trueOptional: {}
capabilities CapabilitiesCapabilities to add/dropOptional: {}
runAsNonRoot booleanRunAsNonRoot indicates that the container must run as a non-root user.
When not set, inherits from podSecurityContext.runAsNonRoot.
Optional: {}
runAsUser integerRunAsUser is the UID to run the entrypoint of the container process.
When not set, inherits from podSecurityContext.runAsUser.
Optional: {}

GatewaySpec configures the gateway reverse proxy and authentication token

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled controls whether the built-in gateway reverse proxy sidecar is
injected into the pod. When false, no proxy container is added and health
probes target the OpenClaw gateway directly on port 18789.
Defaults to true.
trueOptional: {}
existingSecret stringExistingSecret is the name of a user-managed Secret containing the gateway token.
The Secret must have a key named “token”. When set, the operator skips
auto-generating a gateway token Secret and uses this Secret instead.
Optional: {}
controlUiOrigins string arrayControlUiOrigins is a list of additional allowed origins for the Control UI.
The operator always auto-injects localhost origins (http://localhost:18789,
http://127.0.0.1:18789) and derives origins from ingress hosts. Use this
field to add extra origins (e.g., custom reverse proxy URLs).
MaxItems: 20
Optional: {}

GrafanaDashboardSpec configures auto-provisioned Grafana dashboard ConfigMaps

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables Grafana dashboard ConfigMap creationfalseOptional: {}
labels object (keys:string, values:string)Labels to add to the dashboard ConfigMaps (in addition to grafana_dashboard: “1”)Optional: {}
folder stringFolder is the Grafana folder to place the dashboards inOpenClawOptional: {}

ImageSpec defines the container image configuration

Appears in:

FieldDescriptionDefaultValidation
repository stringRepository is the container image repositoryghcr.io/openclaw/openclawOptional: {}
tag stringTag is the container image taglatestOptional: {}
digest stringDigest is the container image digest (overrides tag if specified)Optional: {}
pullPolicy PullPolicyPullPolicy specifies when to pull the imageIfNotPresentEnum: [Always IfNotPresent Never]
Optional: {}
pullSecrets LocalObjectReference arrayPullSecrets is a list of secret names for pulling from private registriesOptional: {}

IngressBasicAuthSpec configures HTTP Basic Authentication for the Ingress.

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables basic authentication.falseOptional: {}
existingSecret stringExistingSecret is the name of an existing Secret that already contains
htpasswd-formatted content in a key named “auth”.
When set, the operator uses this Secret instead of generating one.
Optional: {}
username stringUsername for the auto-generated htpasswd Secret.
Ignored when existingSecret is set.
openclawMaxLength: 64
Optional: {}
realm stringRealm is the authentication realm shown in browser prompts.OpenClawOptional: {}

IngressHost defines a host for the Ingress

Appears in:

FieldDescriptionDefaultValidation
host stringHost is the fully qualified domain name
paths IngressPath arrayPaths is a list of paths to routeOptional: {}

IngressPath defines a path for the Ingress

Appears in:

FieldDescriptionDefaultValidation
path stringPath is the path to route/Optional: {}
pathType stringPathType determines how the path should be matchedPrefixEnum: [Prefix Exact ImplementationSpecific]
Optional: {}
port integerPort is the backend service port number to route traffic to.
Defaults to the gateway port (18789) when not set.
Maximum: 65535
Minimum: 1
Optional: {}

IngressSecuritySpec defines security settings for the Ingress

Appears in:

FieldDescriptionDefaultValidation
forceHTTPS booleanForceHTTPS redirects all HTTP traffic to HTTPStrueOptional: {}
enableHSTS booleanEnableHSTS enables HTTP Strict Transport SecuritytrueOptional: {}
rateLimiting RateLimitingSpecRateLimiting configures rate limitingOptional: {}
basicAuth IngressBasicAuthSpecBasicAuth configures HTTP Basic Authentication for the Ingress.
Disabled by default. When enabled without an existingSecret, the operator
auto-generates a random password and stores it in a managed Secret.
Optional: {}

IngressSpec defines the Ingress configuration

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables Ingress creationfalseOptional: {}
className stringClassName is the name of the IngressClass to useOptional: {}
annotations object (keys:string, values:string)Annotations to add to the IngressOptional: {}
hosts IngressHost arrayHosts is a list of hosts to route traffic forOptional: {}
tls IngressTLS arrayTLS configurationOptional: {}
security IngressSecuritySpecSecurity configures ingress security settingsOptional: {}

IngressTLS defines TLS configuration for the Ingress

Appears in:

FieldDescriptionDefaultValidation
hosts string arrayHosts are a list of hosts included in the TLS certificate
secretName stringSecretName is the name of the secret containing the TLS certificate

LoggingSpec defines logging configuration

Appears in:

FieldDescriptionDefaultValidation
level stringLevel is the log levelinfoEnum: [debug info warn error]
Optional: {}
format stringFormat is the log formatjsonEnum: [json text]
Optional: {}

MetricsSpec defines metrics configuration

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables metrics endpointtrueOptional: {}
port integerPort is the port to expose metrics on9090Optional: {}
serviceMonitor ServiceMonitorSpecServiceMonitor configures the Prometheus ServiceMonitorOptional: {}
prometheusRule PrometheusRuleSpecPrometheusRule configures auto-provisioned PrometheusRule alertsOptional: {}
grafanaDashboard GrafanaDashboardSpecGrafanaDashboard configures auto-provisioned Grafana dashboard ConfigMapsOptional: {}

NetworkPolicySpec configures network isolation for the OpenClaw instance

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables network policy creationtrueOptional: {}
allowedIngressCIDRs string arrayAllowedIngressCIDRs is a list of CIDRs allowed to access this instanceOptional: {}
allowedIngressNamespaces string arrayAllowedIngressNamespaces is a list of namespace names allowed to access this instanceOptional: {}
allowedEgressCIDRs string arrayAllowedEgressCIDRs is a list of CIDRs this instance can reach
Default allows all egress on port 443 for AI APIs
Optional: {}
allowDNS booleanAllowDNS allows DNS resolution (port 53)trueOptional: {}
additionalEgress NetworkPolicyEgressRule arrayAdditionalEgress appends custom egress rules to the default DNS + HTTPS rules.
Use this to allow traffic to cluster-internal services on non-standard ports.
Optional: {}

NetworkingSpec defines network-related configuration

Appears in:

FieldDescriptionDefaultValidation
service ServiceSpecService configures the Kubernetes ServiceOptional: {}
ingress IngressSpecIngress configures the Kubernetes IngressOptional: {}

ObservabilitySpec defines observability configuration

Appears in:

FieldDescriptionDefaultValidation
metrics MetricsSpecMetrics configures Prometheus metricsOptional: {}
logging LoggingSpecLogging configures loggingOptional: {}

OllamaImageSpec defines the Ollama container image

Appears in:

FieldDescriptionDefaultValidation
repository stringRepository is the container image repositoryollama/ollamaOptional: {}
tag stringTag is the container image taglatestOptional: {}
digest stringDigest is the container image digest for supply chain securityOptional: {}

OllamaSpec defines the Ollama sidecar configuration

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables the Ollama sidecarfalseOptional: {}
image OllamaImageSpecImage configures the Ollama container imageOptional: {}
models string arrayModels is a list of models to pre-pull during pod init (e.g. [“llama3.2”, “nomic-embed-text”])MaxItems: 10
Optional: {}
resources ResourcesSpecResources specifies compute resources for the Ollama containerOptional: {}
storage OllamaStorageSpecStorage configures the model cache volumeOptional: {}
gpu integerGPU is the number of NVIDIA GPUs to allocate (sets nvidia.com/gpu resource limit)Minimum: 0
Optional: {}

OllamaStorageSpec configures the Ollama model cache volume

Appears in:

FieldDescriptionDefaultValidation
sizeLimit stringSizeLimit is the size limit for the emptyDir model cache (default “20Gi”)20GiOptional: {}
existingClaim stringExistingClaim is the name of an existing PVC for persistent model storageOptional: {}

OpenClawClusterDefaults is a cluster-scoped singleton (name must be “cluster”) that provides default values merged into every OpenClawInstance at reconcile time. It exists so platform operators managing air-gapped or restricted-network environments can set a single source of truth for image registry mirrors, shared environment variables (e.g. NPM_CONFIG_REGISTRY, PIP_INDEX_URL), and runtime-dep init containers without duplicating the same boilerplate in every OpenClawInstance manifest.

Precedence: per-instance fields always win over cluster defaults. A default is only applied when the corresponding instance field is unset.

FieldDescriptionDefaultValidation
apiVersion stringopenclaw.rocks/v1alpha1
kind stringOpenClawClusterDefaults
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.
spec OpenClawClusterDefaultsSpec

OpenClawClusterDefaultsSpec defines cluster-wide defaults that the operator applies to every OpenClawInstance at reconcile time. Per-instance fields always win: a default is only applied when the instance field is unset.

Appears in:

FieldDescriptionDefaultValidation
registry stringRegistry is the default container image registry override applied to
instances where spec.registry is unset. Replaces the registry prefix of
all container images (main, sidecars, init containers).
Example: “my-registry.example.com”.
Optional: {}
image ImageSpecImage is the default container image configuration applied to instances
where the corresponding instance fields are unset. Each sub-field is
merged independently (e.g. a cluster-default tag still applies even when
the instance sets its own repository).
Optional: {}
env EnvVar arrayEnv is a list of default environment variables merged into every
instance’s container env. Instance-level env entries with the same Name
override the cluster default for that name. Defaults appear first in
the resulting env list, followed by instance-only names.
Optional: {}
runtimeDeps RuntimeDepsSpecRuntimeDeps configures the default set of built-in init containers
(pnpm, Python) applied to instances where the corresponding fields are
unset. A cluster default of true for a runtime dep is always applied
unless the instance explicitly opts out (sets the field to false).
NOTE: because RuntimeDepsSpec fields are plain booleans, “unset” and
”false” are indistinguishable; cluster defaults are OR-merged here.
Optional: {}

OpenClawInstance is the Schema for the openclawinstances API

FieldDescriptionDefaultValidation
apiVersion stringopenclaw.rocks/v1alpha1
kind stringOpenClawInstance
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.
spec OpenClawInstanceSpec

OpenClawInstanceSpec defines the desired state of OpenClawInstance

Appears in:

FieldDescriptionDefaultValidation
registry stringRegistry is the global container image registry override.
When set, this registry replaces the registry part of all container images
used by the instance (main container, sidecars, init containers).
Example: “my-registry.example.com” will change “ghcr.io/openclaw/openclaw:latest”
to “my-registry.example.com/openclaw/openclaw:latest”.
Optional: {}
image ImageSpecImage configuration for the OpenClaw containerOptional: {}
config ConfigSpecConfig specifies the OpenClaw configurationOptional: {}
workspace WorkspaceSpecWorkspace configures initial workspace files seeded into the instance.
Files are copied once on first boot and never overwritten, so agent
modifications survive pod restarts.
Optional: {}
skills string arraySkills is a list of skills to install via init container.
Each entry is either a ClawHub skill identifier (e.g., “@anthropic/mcp-server-fetch”)
or an npm package prefixed with “npm:” (e.g., “npm:@openclaw/matrix”).
npm lifecycle scripts are disabled for security (see #91).
MaxItems: 20
Optional: {}
plugins string arrayPlugins is a list of plugins to install via init container.
Each entry is an npm package name (e.g., “@openclaw/matrix” or
”@martian-engineering/lossless-claw”). An optional “npm:” prefix is
accepted and stripped before installation.
Installation goes through the OpenClaw CLI’s ClawHub installer
(“openclaw plugins install clawhub:”) rather than raw npm install
so packages published with workspace:* dependency markers resolve
correctly. npm lifecycle scripts are disabled for security.
MaxItems: 20
Optional: {}
envFrom EnvFromSource arrayEnvFrom is a list of sources to populate environment variables from
Use this for API keys and other secrets (e.g., ANTHROPIC_API_KEY, OPENAI_API_KEY)
Optional: {}
env EnvVar arrayEnv is a list of environment variables to set in the containerOptional: {}
resources ResourcesSpecResources specifies the compute resources for the OpenClaw containerOptional: {}
security SecuritySpecSecurity specifies security-related configurationOptional: {}
shareProcessNamespace booleanShareProcessNamespace enables PID namespace sharing between all containers
in the pod. When true, the infrastructure (pause) container becomes PID 1
and reaps zombie processes, which prevents accumulation of defunct helper
processes (git, plugins, QMD memory, shells) under a Node.js gateway that
does not call waitpid(). Defaults to true.
Security note: enabling this lets every container in the pod see and signal
every other container’s processes. A compromised sidecar (Tailscale, Ollama,
browser, custom) could send signals to the gateway and vice versa. Set to
false to keep per-container PID isolation; you are then responsible for
reaping zombies (e.g. by baking tini or dumb-init into the image).
trueOptional: {}
storage StorageSpecStorage specifies persistent storage configurationOptional: {}
chromium ChromiumSpecChromium enables the Chromium sidecar for browser automationOptional: {}
tailscale TailscaleSpecTailscale configures Tailscale integration for tailnet access and HTTPSOptional: {}
ollama OllamaSpecOllama enables the Ollama sidecar for local LLM inferenceOptional: {}
webTerminal WebTerminalSpecWebTerminal enables a browser-based terminal (ttyd) sidecar for debuggingOptional: {}
initContainers Container arrayInitContainers is a list of additional init containers to run before the main container.
They run after the operator-managed init-config and init-skills containers.
MaxItems: 10
Optional: {}
sidecars Container arraySidecars is a list of additional sidecar containers to inject into the pod.
Use this for custom sidecars like database proxies, log forwarders, or service meshes.
Optional: {}
sidecarVolumes Volume arraySidecarVolumes is a list of additional volumes to make available to sidecar containers.Optional: {}
extraVolumes Volume arrayExtraVolumes adds additional volumes to the pod.
These volumes are available to the main container via ExtraVolumeMounts.
MaxItems: 10
Optional: {}
extraVolumeMounts VolumeMount arrayExtraVolumeMounts adds additional volume mounts to the main container.
Use with ExtraVolumes to mount ConfigMaps, Secrets, NFS shares, or CSI volumes.
MaxItems: 10
Optional: {}
networking NetworkingSpecNetworking specifies network-related configurationOptional: {}
probes ProbesSpecProbes configures health probes for the OpenClaw containerOptional: {}
observability ObservabilitySpecObservability configures metrics and loggingOptional: {}
availability AvailabilitySpecAvailability configures high availability settingsOptional: {}
suspended booleanSuspended scales the workload to zero replicas when true.
Non-runtime resources (Service, ConfigMap, RBAC, NetworkPolicy, PVC)
remain fully managed. Set to false to resume normal operation.
falseOptional: {}
backup BackupSpecBackup configures periodic scheduled backups to S3-compatible storage.
Requires the s3-backup-credentials Secret in the operator namespace and persistence enabled.
Optional: {}
restoreFrom stringRestoreFrom is the remote backup path to restore data from (e.g. “backups/{tenantId}/{instanceId}/{timestamp}”).
When set, the operator restores PVC data from this path before creating the StatefulSet.
Cleared automatically after successful restore.
Optional: {}
runtimeDeps RuntimeDepsSpecRuntimeDeps configures built-in init containers that install runtime
dependencies (pnpm, Python) for MCP servers and skills.
Optional: {}
gateway GatewaySpecGateway configures the gateway reverse proxy and authentication tokenOptional: {}
autoUpdate AutoUpdateSpecAutoUpdate configures automatic version updates from the OCI registryOptional: {}
selfConfigure SelfConfigureSpecSelfConfigure enables agents to modify their own instance via OpenClawSelfConfig resources.
When enabled, the operator injects RBAC, env vars, and a helper skill into the workspace.
Optional: {}
podAnnotations object (keys:string, values:string)PodAnnotations are extra annotations merged into the pod template metadata.
Operator-managed annotations (e.g. config-hash) take precedence on conflict.
Optional: {}

OpenClawSelfConfig is the Schema for the openclawselfconfigs API. It represents a request from an agent to modify its own OpenClawInstance spec.

FieldDescriptionDefaultValidation
apiVersion stringopenclaw.rocks/v1alpha1
kind stringOpenClawSelfConfig
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.
spec OpenClawSelfConfigSpec

OpenClawSelfConfigSpec defines the desired changes to an OpenClawInstance.

Appears in:

FieldDescriptionDefaultValidation
instanceRef stringInstanceRef is the name of the parent OpenClawInstance in the same namespace.MinLength: 1
addSkills string arrayAddSkills is a list of skills to add to the instance.MaxItems: 10
Optional: {}
removeSkills string arrayRemoveSkills is a list of skills to remove from the instance.MaxItems: 10
Optional: {}
configPatch RawConfigConfigPatch is a partial JSON configuration to deep-merge into the instance config.Optional: {}
addWorkspaceFiles object (keys:string, values:string)AddWorkspaceFiles maps filenames to content to add to the workspace.MaxProperties: 10
Optional: {}
removeWorkspaceFiles string arrayRemoveWorkspaceFiles is a list of workspace filenames to remove.MaxItems: 10
Optional: {}
addEnvVars SelfConfigEnvVar arrayAddEnvVars is a list of environment variables to add (plain values only).MaxItems: 10
Optional: {}
removeEnvVars string arrayRemoveEnvVars is a list of environment variable names to remove.MaxItems: 10
Optional: {}

PersistenceSpec defines PVC configuration

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables persistent storagetrueOptional: {}
storageClass stringStorageClass is the name of the StorageClass to useOptional: {}
size stringSize is the size of the PVC (e.g., “10Gi”)10GiOptional: {}
accessModes PersistentVolumeAccessMode arrayAccessModes contains the desired access modes for the PVC[ReadWriteOnce]Optional: {}
existingClaim stringExistingClaim is the name of an existing PVC to useOptional: {}
orphan booleanOrphan controls whether the PVC is retained when the OpenClawInstance is deleted.
When true (the default), the operator removes the owner reference from the PVC
before deleting the CR so Kubernetes does not garbage-collect it.
Set to false if you want the PVC deleted together with the CR.
trueOptional: {}

PodDisruptionBudgetSpec defines PDB configuration

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables PDB creationtrueOptional: {}
maxUnavailable integerMaxUnavailable is the maximum number of pods that can be unavailable during disruption1Optional: {}

PodSecurityContextSpec defines pod-level security context

Appears in:

FieldDescriptionDefaultValidation
runAsUser integerRunAsUser is the UID to run the entrypoint of the container process1000Optional: {}
runAsGroup integerRunAsGroup is the GID to run the entrypoint of the container process1000Optional: {}
fsGroup integerFSGroup is a special supplemental group that applies to all containers1000Optional: {}
fsGroupChangePolicy PodFSGroupChangePolicyFSGroupChangePolicy defines the behavior of changing ownership and permission of the volume.
”OnRootMismatch” skips recursive chown when ownership already matches, improving startup
time for large PVCs. “Always” recursively chowns on every mount (Kubernetes default).
Enum: [OnRootMismatch Always]
Optional: {}
runAsNonRoot booleanRunAsNonRoot indicates that the container must run as a non-root usertrueOptional: {}

ProbeSpec defines a health probe

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables the probetrueOptional: {}
initialDelaySeconds integerInitialDelaySeconds is the number of seconds after the container starts before the probe is initiatedOptional: {}
periodSeconds integerPeriodSeconds is how often (in seconds) to perform the probeOptional: {}
timeoutSeconds integerTimeoutSeconds is the number of seconds after which the probe times outOptional: {}
failureThreshold integerFailureThreshold is the number of times to retry before giving upOptional: {}

ProbesSpec defines health probe configuration

Appears in:

FieldDescriptionDefaultValidation
liveness ProbeSpecLiveness probe configurationOptional: {}
readiness ProbeSpecReadiness probe configurationOptional: {}
startup ProbeSpecStartup probe configurationOptional: {}

PrometheusRuleSpec configures auto-provisioned PrometheusRule alerts

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables PrometheusRule creation with operator alertsfalseOptional: {}
labels object (keys:string, values:string)Labels to add to the PrometheusRule (e.g., for Prometheus rule selector matching)Optional: {}
runbookBaseURL stringRunbookBaseURL is the base URL for alert runbook linkshttps://openclaw.rocks/docs/runbooksOptional: {}

RBACRule represents a RBAC rule

Appears in:

FieldDescriptionDefaultValidation
apiGroups string arrayAPIGroups is the name of the APIGroup that contains the resources
resources string arrayResources is a list of resources this rule applies to
verbs string arrayVerbs is a list of verbs that apply to the resources

RBACSpec configures RBAC for the OpenClaw instance

Appears in:

FieldDescriptionDefaultValidation
createServiceAccount booleanCreateServiceAccount creates a dedicated ServiceAccount for the instancetrueOptional: {}
serviceAccountName stringServiceAccountName is the name of an existing ServiceAccount to use
Only used if CreateServiceAccount is false
Optional: {}
serviceAccountAnnotations object (keys:string, values:string)ServiceAccountAnnotations are annotations to add to the managed ServiceAccount.
Use this for cloud provider integrations like AWS IRSA or GCP Workload Identity.
Optional: {}
additionalRules RBACRule arrayAdditionalRules adds custom RBAC rules to the generated RoleOptional: {}

RateLimitingSpec defines rate limiting configuration

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables rate limitingtrueOptional: {}
requestsPerSecond integerRequestsPerSecond is the maximum requests per second10Optional: {}

RawConfig holds arbitrary JSON configuration for openclaw.json

Appears in:

ResourcesSpec defines compute resource requirements

Appears in:

RuntimeDepsSpec configures built-in init containers that install runtime dependencies to the data PVC for use by MCP servers and skills.

Appears in:

FieldDescriptionDefaultValidation
pnpm booleanPnpm installs pnpm via corepack for npm-based MCP servers and skills.Optional: {}
python booleanPython installs Python 3.12 and uv for Python-based MCP servers and skills.Optional: {}

SecuritySpec defines security-related configuration

Appears in:

FieldDescriptionDefaultValidation
podSecurityContext PodSecurityContextSpecPodSecurityContext holds pod-level security attributesOptional: {}
containerSecurityContext ContainerSecurityContextSpecContainerSecurityContext holds container-level security attributesOptional: {}
networkPolicy NetworkPolicySpecNetworkPolicy configures network isolationOptional: {}
rbac RBACSpecRBAC configures role-based access controlOptional: {}
caBundle CABundleSpecCABundle injects a custom CA certificate bundle into all containers.
Use this in environments with TLS-intercepting proxies or private CAs.
Optional: {}

Underlying type: string

SelfConfigAction represents an action category that can be allowed for self-configuration.

Validation:

  • Enum: [skills config workspaceFiles envVars]

Appears in:

FieldDescription
skills
config
workspaceFiles
envVars

SelfConfigEnvVar defines a plain-value environment variable (no secret refs).

Appears in:

FieldDescriptionDefaultValidation
name stringName of the environment variable.MinLength: 1
value stringValue of the environment variable.

SelfConfigureSpec configures whether an agent can modify its own instance.

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables self-configuration for this instance.
When true, the agent can create OpenClawSelfConfig resources to modify its own spec.
falseOptional: {}
allowedActions SelfConfigAction arrayAllowedActions restricts which action categories the agent can perform.
If empty and enabled is true, no actions are allowed (fail-safe).
Enum: [skills config workspaceFiles envVars]
MaxItems: 4
Optional: {}

ServiceMonitorSpec defines the ServiceMonitor configuration

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables ServiceMonitor creationfalseOptional: {}
interval stringInterval is the scrape interval30sOptional: {}
labels object (keys:string, values:string)Labels to add to the ServiceMonitorOptional: {}

ServicePortSpec defines a port exposed by the Service

Appears in:

FieldDescriptionDefaultValidation
name stringName is the name of the portMinLength: 1
port integerPort is the port number exposed on the ServiceMaximum: 65535
Minimum: 1
targetPort integerTargetPort is the port on the container to route to (defaults to Port)Maximum: 65535
Minimum: 1
Optional: {}
protocol ProtocolProtocol is the protocol for the portTCPEnum: [TCP UDP SCTP]
Optional: {}

ServiceSpec defines the Service configuration

Appears in:

FieldDescriptionDefaultValidation
type ServiceTypeType is the Kubernetes Service typeClusterIPEnum: [ClusterIP LoadBalancer NodePort]
Optional: {}
annotations object (keys:string, values:string)Annotations to add to the ServiceOptional: {}
ports ServicePortSpec arrayPorts defines custom ports exposed on the Service.
When set, these replace the default gateway and canvas ports.
When empty, the operator creates default gateway (18789) and canvas (18793) ports.
MaxItems: 20
Optional: {}

StorageSpec defines persistent storage configuration

Appears in:

FieldDescriptionDefaultValidation
persistence PersistenceSpecPersistence configures the PersistentVolumeClaimOptional: {}

TailscaleImageSpec defines the Tailscale sidecar container image

Appears in:

FieldDescriptionDefaultValidation
repository stringRepository is the container image repositoryghcr.io/tailscale/tailscaleOptional: {}
tag stringTag is the container image taglatestOptional: {}
digest stringDigest is the container image digest for supply chain securityOptional: {}

TailscaleSpec configures Tailscale integration for secure tailnet access. When enabled, a Tailscale sidecar container runs tailscaled and handles serve/funnel via TS_SERVE_CONFIG. An init container copies the tailscale CLI binary to a shared volume so the main container can call “tailscale whois” for SSO authentication.

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables Tailscale integrationfalseOptional: {}
mode stringMode selects the Tailscale mode.
”serve” exposes the instance to tailnet members only (default).
“funnel” exposes the instance to the public internet via Tailscale Funnel.
serveEnum: [serve funnel]
Optional: {}
image TailscaleImageSpecImage configures the Tailscale sidecar container image.
The same image is used for the sidecar and the init container that
copies the tailscale CLI binary.
Optional: {}
authKeySecretRef LocalObjectReferenceAuthKeySecretRef references a Secret containing the Tailscale auth key.
The Secret must have a key matching AuthKeySecretKey (default: “authkey”).
Use ephemeral+reusable keys from the Tailscale admin console.
Optional: {}
authKeySecretKey stringAuthKeySecretKey is the key in the referenced Secret.authkeyOptional: {}
hostname stringHostname sets the Tailscale device name (defaults to instance name).Optional: {}
authSSO booleanAuthSSO enables passwordless login for tailnet members.
Sets gateway.auth.allowTailscale=true in the OpenClaw config.
falseOptional: {}
resources ResourcesSpecResources specifies compute resources for the Tailscale sidecar container.Optional: {}

WebTerminalCredentialSpec configures basic auth for the web terminal

Appears in:

FieldDescriptionDefaultValidation
secretRef LocalObjectReferenceSecretRef references a Secret containing “username” and “password” keys

WebTerminalImageSpec defines the ttyd container image

Appears in:

FieldDescriptionDefaultValidation
repository stringRepository is the container image repositorytsl0922/ttydOptional: {}
tag stringTag is the container image taglatestOptional: {}
digest stringDigest is the container image digest for supply chain securityOptional: {}

WebTerminalSpec defines the ttyd web terminal sidecar configuration

Appears in:

FieldDescriptionDefaultValidation
enabled booleanEnabled enables the ttyd web terminal sidecar for browser-based shell accessfalseOptional: {}
image WebTerminalImageSpecImage configures the ttyd container imageOptional: {}
resources ResourcesSpecResources specifies compute resources for the ttyd containerOptional: {}
readOnly booleanReadOnly starts ttyd in read-only mode (view-only, no input)falseOptional: {}
credential WebTerminalCredentialSpecCredential configures basic auth for the web terminal via a Secret.
The Secret must have “username” and “password” keys.
Optional: {}

WorkspaceSpec configures initial workspace files for the instance. Files listed in InitialFiles are seeded once (only if they don’t already exist on the PVC), so agent modifications survive pod restarts.

Appears in:

FieldDescriptionDefaultValidation
configMapRef ConfigMapNameSelectorConfigMapRef references an external ConfigMap whose keys become workspace files.
All keys in the referenced ConfigMap are included as workspace files.
This is useful for GitOps workflows where workspace files (AGENT.md, SOUL.md, etc.)
are managed as standalone files and bundled via Kustomize configMapGenerator or similar.
Merge priority (highest wins):
1. Operator-injected files (ENVIRONMENT.md, BOOTSTRAP.md, SELFCONFIG.md, selfconfig.sh)
2. Inline initialFiles
3. External configMapRef entries
4. Skill pack files
Optional: {}
initialFiles object (keys:string, values:string)InitialFiles maps filenames to their content. Each file is written
to the workspace directory only if it does not already exist.
MaxProperties: 50
Optional: {}
initialDirectories string arrayInitialDirectories is a list of directories to create (mkdir -p)
inside the workspace directory. Nested paths like “tools/scripts” are allowed.
MaxItems: 20
Optional: {}
additionalWorkspaces AdditionalWorkspace arrayAdditionalWorkspaces configures workspace files for secondary agents.
Each entry seeds files to ~/.openclaw/workspace-/, matching the
workspace path configured in spec.config.raw.agents.list[].workspace.
MaxItems: 10
Optional: {}
bootstrap BootstrapSpecBootstrap controls the operator-managed BOOTSTRAP.md file injected into
the default workspace to guide first-run agent onboarding.
Optional: {}