{
  "properties": {
    "spec": {
      "additionalProperties": false,
      "properties": {
        "idleTimeoutMinutes": {
          "default": 30,
          "description": "Minutes of inactivity before the terminal pod is stopped.",
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "image": {
          "default": "ghcr.io/open-webui/open-terminal:latest",
          "description": "Container image for the Open Terminal instance.",
          "type": [
            "string",
            "null"
          ]
        },
        "packages": {
          "default": [],
          "description": "Apt packages to pre-install in the terminal.",
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "persistence": {
          "additionalProperties": false,
          "properties": {
            "enabled": {
              "default": true,
              "type": [
                "boolean",
                "null"
              ]
            },
            "size": {
              "default": "1Gi",
              "type": [
                "string",
                "null"
              ]
            },
            "storageClass": {
              "default": "ceph-block",
              "description": "StorageClass for the terminal PVC. If unset, the cluster's default StorageClass is used (recommended for managed Kubernetes such as EKS, GKE, AKS). Set explicitly to \"\" to disable dynamic provisioning.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "pipPackages": {
          "default": [],
          "description": "Pip packages to pre-install in the terminal.",
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "resources": {
          "additionalProperties": false,
          "properties": {
            "limits": {
              "additionalProperties": false,
              "properties": {
                "cpu": {
                  "default": "1",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "memory": {
                  "default": "1Gi",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "requests": {
              "additionalProperties": false,
              "properties": {
                "cpu": {
                  "default": "100m",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "memory": {
                  "default": "256Mi",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "userId": {
          "description": "Open WebUI user ID that owns this terminal.",
          "type": "string"
        }
      },
      "required": [
        "userId"
      ],
      "type": "object"
    },
    "status": {
      "additionalProperties": false,
      "properties": {
        "apiKeySecret": {
          "description": "Name of the Secret holding the terminal API key.",
          "type": [
            "string",
            "null"
          ]
        },
        "conditions": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "lastTransitionTime": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "lastActivityAt": {
          "description": "Timestamp of the last proxied request.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "description": "Human-readable status message.",
          "type": [
            "string",
            "null"
          ]
        },
        "phase": {
          "enum": [
            "Pending",
            "Provisioning",
            "Running",
            "Idle",
            "Error"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "podName": {
          "type": [
            "string",
            "null"
          ]
        },
        "serviceName": {
          "type": [
            "string",
            "null"
          ]
        },
        "serviceUrl": {
          "description": "Full URL (http://svc:port) reachable within the cluster.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}