mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-16 22:37:16 +00:00
* Docs: change swagger api config * Docs: change swagger api config * Docs: change swagger api config * Feat: support ui schema * Fix: distinguish between structs and arrays * Feat: support build swagger config * Feat: support update ui schema Co-authored-by: barnettZQG <yiyun.pro>
386 lines
18 KiB
JSON
386 lines
18 KiB
JSON
{
|
|
"schema": {
|
|
"properties": {
|
|
"addRevisionLabel": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "If addRevisionLabel is true, the appRevision label will be added to the underlying pods",
|
|
"title": "addRevisionLabel"
|
|
},
|
|
"cmd": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Commands to run in the container",
|
|
"title": "cmd"
|
|
},
|
|
"cpu": {
|
|
"type": "string",
|
|
"description": "Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core)",
|
|
"title": "cpu"
|
|
},
|
|
"env": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Environment variable name",
|
|
"title": "name"
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "The value of the environment variable",
|
|
"title": "value"
|
|
},
|
|
"valueFrom": {
|
|
"properties": {
|
|
"secretKeyRef": {
|
|
"properties": {
|
|
"key": {
|
|
"type": "string",
|
|
"description": "The key of the secret to select from. Must be a valid secret key",
|
|
"title": "key"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The name of the secret in the pod's namespace to select from",
|
|
"title": "name"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"key"
|
|
],
|
|
"type": "object",
|
|
"description": "Selects a key of a secret in the pod's namespace",
|
|
"title": "secretKeyRef"
|
|
}
|
|
},
|
|
"required": [
|
|
"secretKeyRef"
|
|
],
|
|
"type": "object",
|
|
"description": "Specifies a source the value of this var should come from",
|
|
"title": "valueFrom"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"description": "Define arguments by using environment variables",
|
|
"title": "env"
|
|
},
|
|
"image": {
|
|
"type": "string",
|
|
"description": "Which image would you like to use for your service",
|
|
"title": "image"
|
|
},
|
|
"imagePullPolicy": {
|
|
"type": "string",
|
|
"description": "Specify image pull policy for your service",
|
|
"title": "imagePullPolicy"
|
|
},
|
|
"imagePullSecrets": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Specify image pull secrets for your service",
|
|
"title": "imagePullSecrets"
|
|
},
|
|
"livenessProbe": {
|
|
"properties": {
|
|
"exec": {
|
|
"properties": {
|
|
"command": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures.",
|
|
"title": "command"
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
],
|
|
"type": "object",
|
|
"description": "Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute.",
|
|
"title": "exec"
|
|
},
|
|
"failureThreshold": {
|
|
"type": "integer",
|
|
"default": 3,
|
|
"description": "Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe).",
|
|
"title": "failureThreshold"
|
|
},
|
|
"httpGet": {
|
|
"properties": {
|
|
"httpHeaders": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"title": "name"
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"title": "value"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"value"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"title": "httpHeaders"
|
|
},
|
|
"path": {
|
|
"type": "string",
|
|
"description": "The endpoint, relative to the port, to which the HTTP GET request should be directed.",
|
|
"title": "path"
|
|
},
|
|
"port": {
|
|
"type": "integer",
|
|
"description": "The TCP socket within the container to which the HTTP GET request should be directed.",
|
|
"title": "port"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"port"
|
|
],
|
|
"type": "object",
|
|
"description": "Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute.",
|
|
"title": "httpGet"
|
|
},
|
|
"initialDelaySeconds": {
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "Number of seconds after the container is started before the first probe is initiated.",
|
|
"title": "initialDelaySeconds"
|
|
},
|
|
"periodSeconds": {
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "How often, in seconds, to execute the probe.",
|
|
"title": "periodSeconds"
|
|
},
|
|
"successThreshold": {
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Minimum consecutive successes for the probe to be considered successful after having failed.",
|
|
"title": "successThreshold"
|
|
},
|
|
"tcpSocket": {
|
|
"properties": {
|
|
"port": {
|
|
"type": "integer",
|
|
"description": "The TCP socket within the container that should be probed to assess container health.",
|
|
"title": "port"
|
|
}
|
|
},
|
|
"required": [
|
|
"port"
|
|
],
|
|
"type": "object",
|
|
"description": "Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute.",
|
|
"title": "tcpSocket"
|
|
},
|
|
"timeoutSeconds": {
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Number of seconds after which the probe times out.",
|
|
"title": "timeoutSeconds"
|
|
}
|
|
},
|
|
"required": [
|
|
"initialDelaySeconds",
|
|
"periodSeconds",
|
|
"timeoutSeconds",
|
|
"successThreshold",
|
|
"failureThreshold"
|
|
],
|
|
"type": "object",
|
|
"description": "Instructions for assessing whether the container is alive.",
|
|
"title": "livenessProbe"
|
|
},
|
|
"memory": {
|
|
"type": "string",
|
|
"description": "Specifies the attributes of the memory resource required for the container.",
|
|
"title": "memory"
|
|
},
|
|
"port": {
|
|
"type": "integer",
|
|
"default": 80,
|
|
"description": "Which port do you want customer traffic sent to",
|
|
"title": "port"
|
|
},
|
|
"readinessProbe": {
|
|
"properties": {
|
|
"exec": {
|
|
"properties": {
|
|
"command": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "A command to be executed inside the container to assess its health. Each space delimited token of the command is a separate array element. Commands exiting 0 are considered to be successful probes, whilst all other exit codes are considered failures.",
|
|
"title": "command"
|
|
}
|
|
},
|
|
"required": [
|
|
"command"
|
|
],
|
|
"type": "object",
|
|
"description": "Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute.",
|
|
"title": "exec"
|
|
},
|
|
"failureThreshold": {
|
|
"type": "integer",
|
|
"default": 3,
|
|
"description": "Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe).",
|
|
"title": "failureThreshold"
|
|
},
|
|
"httpGet": {
|
|
"properties": {
|
|
"httpHeaders": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"title": "name"
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"title": "value"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"value"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"title": "httpHeaders"
|
|
},
|
|
"path": {
|
|
"type": "string",
|
|
"description": "The endpoint, relative to the port, to which the HTTP GET request should be directed.",
|
|
"title": "path"
|
|
},
|
|
"port": {
|
|
"type": "integer",
|
|
"description": "The TCP socket within the container to which the HTTP GET request should be directed.",
|
|
"title": "port"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"port"
|
|
],
|
|
"type": "object",
|
|
"description": "Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute.",
|
|
"title": "httpGet"
|
|
},
|
|
"initialDelaySeconds": {
|
|
"type": "integer",
|
|
"default": 0,
|
|
"description": "Number of seconds after the container is started before the first probe is initiated.",
|
|
"title": "initialDelaySeconds"
|
|
},
|
|
"periodSeconds": {
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "How often, in seconds, to execute the probe.",
|
|
"title": "periodSeconds"
|
|
},
|
|
"successThreshold": {
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Minimum consecutive successes for the probe to be considered successful after having failed.",
|
|
"title": "successThreshold"
|
|
},
|
|
"tcpSocket": {
|
|
"properties": {
|
|
"port": {
|
|
"type": "integer",
|
|
"description": "The TCP socket within the container that should be probed to assess container health.",
|
|
"title": "port"
|
|
}
|
|
},
|
|
"required": [
|
|
"port"
|
|
],
|
|
"type": "object",
|
|
"description": "Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute.",
|
|
"title": "tcpSocket"
|
|
},
|
|
"timeoutSeconds": {
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Number of seconds after which the probe times out.",
|
|
"title": "timeoutSeconds"
|
|
}
|
|
},
|
|
"required": [
|
|
"initialDelaySeconds",
|
|
"periodSeconds",
|
|
"timeoutSeconds",
|
|
"successThreshold",
|
|
"failureThreshold"
|
|
],
|
|
"type": "object",
|
|
"description": "Instructions for assessing whether the container is in a suitable state to serve traffic.",
|
|
"title": "readinessProbe"
|
|
},
|
|
"volumes": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"mountPath": {
|
|
"type": "string",
|
|
"title": "mountPath"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"title": "name"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pvc",
|
|
"configMap",
|
|
"secret",
|
|
"emptyDir"
|
|
],
|
|
"description": "Specify volume type, options: \"pvc\",\"configMap\",\"secret\",\"emptyDir\"",
|
|
"title": "type"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"mountPath",
|
|
"type"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"description": "Declare volumes and volumeMounts",
|
|
"title": "volumes"
|
|
}
|
|
},
|
|
"required": [
|
|
"addRevisionLabel",
|
|
"image",
|
|
"port"
|
|
],
|
|
"type": "object"
|
|
}
|
|
} |