{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "replicaCount": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1,
      "default": 1,
      "description": "Must be 1 for single-user architecture. Openclaw does not support horizontal scaling."
    },
    "image": {
      "type": "object",
      "properties": {
        "repository": {
          "type": "string"
        },
        "pullPolicy": {
          "type": "string",
          "enum": ["Always", "IfNotPresent", "Never"]
        },
        "tag": {
          "type": "string"
        }
      }
    },
    "gateway": {
      "type": "object",
      "properties": {
        "bind": {
          "type": "string",
          "enum": ["loopback", "lan", "auto"],
          "description": "Gateway binding mode"
        },
        "port": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535
        }
      }
    },
    "persistence": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "size": {
          "type": "string",
          "pattern": "^[0-9]+(Gi|Mi|Ti)$"
        },
        "accessMode": {
          "type": "string",
          "enum": ["ReadWriteOnce", "ReadOnlyMany", "ReadWriteMany"]
        }
      }
    },
    "service": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["ClusterIP", "NodePort", "LoadBalancer"]
        },
        "port": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535
        }
      }
    }
  },
  "required": ["replicaCount"]
}
