hí ộ
This commit is contained in:
116
templates/schemas/generic-http-service.v1.json
Normal file
116
templates/schemas/generic-http-service.v1.json
Normal file
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/generic-http-service/v1",
|
||||
"title": "generic-http-service@v1",
|
||||
"description": "One HTTP workload: a Deployment and a ClusterIP Service for in-cluster traffic.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["templateRef", "metadata", "runtime", "replicas", "resources", "healthCheck"],
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"description": "The contract this spec is frozen against. Never a chart coordinate.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["name", "version"],
|
||||
"properties": {
|
||||
"name": {"type": "string", "pattern": "^[a-z][a-z0-9-]{0,62}$"},
|
||||
"version": {"type": "string", "pattern": "^v[0-9]+$"}
|
||||
}
|
||||
},
|
||||
"type": {"const": "web"},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"description": {"type": "string"},
|
||||
"owner": {"type": "string"},
|
||||
"labels": {
|
||||
"description": "The platform/ prefix is reserved: the gateway writes its own identity labels there and a spec must not collide with them.",
|
||||
"type": "object",
|
||||
"propertyNames": {"not": {"pattern": "^platform\\.example/"}},
|
||||
"additionalProperties": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["image", "resolvedImage", "ports"],
|
||||
"properties": {
|
||||
"image": {"type": "string"},
|
||||
"resolvedImage": {
|
||||
"description": "Digest-pinned by the Backend; a tag would break reproducibility.",
|
||||
"type": "string",
|
||||
"pattern": "^[^ @]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"command": {"type": "array", "items": {"type": "string"}},
|
||||
"args": {"type": "array", "items": {"type": "string"}},
|
||||
"ports": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["name", "containerPort"],
|
||||
"properties": {
|
||||
"name": {"type": "string", "pattern": "^[a-z][a-z0-9-]{0,14}$"},
|
||||
"containerPort": {"type": "integer", "minimum": 1, "maximum": 65535}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runAsRoot": {
|
||||
"description": "Run the container as root, for images that cannot drop privileges. Every other restricted control still applies; a port below 1024 also gets NET_BIND_SERVICE, without which root still cannot bind it.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"type": "object",
|
||||
"propertyNames": {"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"},
|
||||
"additionalProperties": {"type": "string"}
|
||||
},
|
||||
"replicas": {"type": "integer", "minimum": 1, "maximum": 10},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["size"],
|
||||
"properties": {"size": {"enum": ["nano", "small", "medium", "large"]}}
|
||||
},
|
||||
"healthCheck": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["path", "port", "initialDelaySeconds"],
|
||||
"properties": {
|
||||
"path": {"type": "string", "pattern": "^/"},
|
||||
"port": {"type": "integer", "minimum": 1, "maximum": 65535},
|
||||
"initialDelaySeconds": {"type": "integer", "minimum": 0, "maximum": 600}
|
||||
}
|
||||
},
|
||||
"exposure": {
|
||||
"description": "public renders an Ingress on the platform's wildcard host; path stays pinned to \"/\" because the template routes the whole host to one Service.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {"public": {"type": "boolean"}, "path": {"const": "/"}}
|
||||
},
|
||||
"secretRefs": {"type": "array", "maxItems": 0},
|
||||
"mounts": {"type": "array", "maxItems": 0},
|
||||
"dependencies": {"type": "array", "maxItems": 0},
|
||||
"contract": {"type": "object", "additionalProperties": false}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$comment": "A public deployment is addressed by a hostname built from the service name, so that name has to be present. It travels in metadata.labels.service, optional for a private deployment; requiring it only when exposure.public is true keeps the dependency visible in the published contract instead of surfacing as a render error.",
|
||||
"if": {
|
||||
"type": "object",
|
||||
"required": ["exposure"],
|
||||
"properties": {"exposure": {"required": ["public"], "properties": {"public": {"const": true}}}}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"metadata": {"required": ["labels"], "properties": {"labels": {"required": ["service"]}}}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
92
templates/schemas/generic-http-service.v2.json
Normal file
92
templates/schemas/generic-http-service.v2.json
Normal file
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/generic-http-service/v2",
|
||||
"title": "generic-http-service@v2",
|
||||
"description": "One HTTP workload with a stable ClusterIP Service per logical service.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["templateRef", "metadata", "runtime", "replicas", "resources", "healthCheck"],
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object", "additionalProperties": false, "required": ["name", "version"],
|
||||
"properties": {
|
||||
"name": {"const": "generic-http-service"},
|
||||
"version": {"const": "v2"}
|
||||
}
|
||||
},
|
||||
"type": {"const": "web"},
|
||||
"metadata": {
|
||||
"type": "object", "additionalProperties": false,
|
||||
"properties": {
|
||||
"description": {"type": "string"}, "owner": {"type": "string"},
|
||||
"labels": {
|
||||
"type": "object", "propertyNames": {"not": {"pattern": "^platform\\.example/"}},
|
||||
"additionalProperties": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"type": "object", "additionalProperties": false, "required": ["image", "resolvedImage", "ports"],
|
||||
"properties": {
|
||||
"image": {"type": "string"},
|
||||
"resolvedImage": {"type": "string", "pattern": "^[^ @]+@sha256:[a-f0-9]{64}$"},
|
||||
"command": {"type": "array", "items": {"type": "string"}},
|
||||
"args": {"type": "array", "items": {"type": "string"}},
|
||||
"ports": {
|
||||
"type": "array", "minItems": 1, "maxItems": 1,
|
||||
"items": {
|
||||
"type": "object", "additionalProperties": false, "required": ["name", "containerPort"],
|
||||
"properties": {
|
||||
"name": {"const": "http"},
|
||||
"containerPort": {"type": "integer", "minimum": 1, "maximum": 65535}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runAsRoot": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"type": "object", "propertyNames": {"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"},
|
||||
"additionalProperties": {"type": "string"}
|
||||
},
|
||||
"replicas": {"type": "integer", "minimum": 1, "maximum": 10},
|
||||
"resources": {
|
||||
"type": "object", "additionalProperties": false, "required": ["size"],
|
||||
"properties": {"size": {"enum": ["nano", "small", "medium", "large"]}}
|
||||
},
|
||||
"healthCheck": {
|
||||
"type": "object", "additionalProperties": false,
|
||||
"required": ["path", "port", "initialDelaySeconds"],
|
||||
"properties": {
|
||||
"path": {"type": "string", "pattern": "^/"},
|
||||
"port": {"type": "integer", "minimum": 1, "maximum": 65535},
|
||||
"initialDelaySeconds": {"type": "integer", "minimum": 0, "maximum": 600}
|
||||
}
|
||||
},
|
||||
"exposure": {
|
||||
"type": "object", "additionalProperties": false,
|
||||
"properties": {"public": {"type": "boolean"}, "path": {"const": "/"}}
|
||||
},
|
||||
"secretRefs": {"type": "array", "maxItems": 0},
|
||||
"mounts": {"type": "array", "maxItems": 0},
|
||||
"dependencies": {
|
||||
"type": "array", "maxItems": 20,
|
||||
"items": {
|
||||
"type": "object", "additionalProperties": false,
|
||||
"required": ["serviceId", "alias", "protocol"],
|
||||
"properties": {
|
||||
"serviceId": {"type": "string", "pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$"},
|
||||
"alias": {"type": "string", "pattern": "^[A-Z][A-Z0-9_]{0,48}$"},
|
||||
"protocol": {"const": "http"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"contract": {"type": "object", "additionalProperties": false}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {"required": ["exposure"], "properties": {"exposure": {"required": ["public"], "properties": {"public": {"const": true}}}}},
|
||||
"then": {"properties": {"metadata": {"required": ["labels"], "properties": {"labels": {"required": ["service"]}}}}}
|
||||
}
|
||||
]
|
||||
}
|
||||
305
templates/schemas/generic-http-service.v3.json
Normal file
305
templates/schemas/generic-http-service.v3.json
Normal file
@@ -0,0 +1,305 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/generic-http-service/v3",
|
||||
"title": "generic-http-service@v3",
|
||||
"description": "One HTTP workload with a stable ClusterIP Service per logical service.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"templateRef",
|
||||
"metadata",
|
||||
"runtime",
|
||||
"replicas",
|
||||
"resources",
|
||||
"healthCheck"
|
||||
],
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"version"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "generic-http-service"
|
||||
},
|
||||
"version": {
|
||||
"const": "v3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"const": "web"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"not": {
|
||||
"pattern": "^platform\\.example/"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"image",
|
||||
"resolvedImage",
|
||||
"ports"
|
||||
],
|
||||
"properties": {
|
||||
"image": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolvedImage": {
|
||||
"type": "string",
|
||||
"pattern": "^[^ @]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"command": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"args": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ports": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"containerPort"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "http"
|
||||
},
|
||||
"containerPort": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runAsRoot": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"replicas": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 10
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"size": {
|
||||
"enum": [
|
||||
"nano",
|
||||
"small",
|
||||
"medium",
|
||||
"large"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"healthCheck": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"path",
|
||||
"port",
|
||||
"initialDelaySeconds"
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"pattern": "^/"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
},
|
||||
"initialDelaySeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 600
|
||||
}
|
||||
}
|
||||
},
|
||||
"exposure": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"public": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"path": {
|
||||
"const": "/"
|
||||
}
|
||||
}
|
||||
},
|
||||
"secretRefs": {
|
||||
"type": "array",
|
||||
"maxItems": 0
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"serviceId",
|
||||
"alias",
|
||||
"protocol"
|
||||
],
|
||||
"properties": {
|
||||
"serviceId": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$"
|
||||
},
|
||||
"alias": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{0,48}$"
|
||||
},
|
||||
"protocol": {
|
||||
"const": "http"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"contract": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"volumeAttachments": {
|
||||
"type": "array",
|
||||
"maxItems": 8,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"mountPath",
|
||||
"storageProfile",
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9](?:[-a-z0-9]{0,18}[a-z0-9])?$"
|
||||
},
|
||||
"mountPath": {
|
||||
"type": "string",
|
||||
"pattern": "^/(?!/).+"
|
||||
},
|
||||
"storageProfile": {
|
||||
"const": "local-data"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+(?:\\.[0-9]+)?(?:[EPTGMK]i?|m)?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"required": [
|
||||
"exposure"
|
||||
],
|
||||
"properties": {
|
||||
"exposure": {
|
||||
"required": [
|
||||
"public"
|
||||
],
|
||||
"properties": {
|
||||
"public": {
|
||||
"const": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"required": [
|
||||
"labels"
|
||||
],
|
||||
"properties": {
|
||||
"labels": {
|
||||
"required": [
|
||||
"service"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"required": [
|
||||
"volumeAttachments"
|
||||
],
|
||||
"properties": {
|
||||
"volumeAttachments": {
|
||||
"minItems": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"replicas": {
|
||||
"const": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
330
templates/schemas/generic-http-service.v4.json
Normal file
330
templates/schemas/generic-http-service.v4.json
Normal file
@@ -0,0 +1,330 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/generic-http-service/v4",
|
||||
"title": "generic-http-service@v4",
|
||||
"description": "One HTTP workload with a stable ClusterIP Service per logical service.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"templateRef",
|
||||
"metadata",
|
||||
"runtime",
|
||||
"replicas",
|
||||
"resources",
|
||||
"healthCheck"
|
||||
],
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"version"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "generic-http-service"
|
||||
},
|
||||
"version": {
|
||||
"const": "v4"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"const": "web"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"not": {
|
||||
"pattern": "^platform\\.example/"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"image",
|
||||
"resolvedImage",
|
||||
"ports"
|
||||
],
|
||||
"properties": {
|
||||
"image": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolvedImage": {
|
||||
"type": "string",
|
||||
"pattern": "^[^ @]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"command": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"args": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ports": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"containerPort"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"maxLength": 15,
|
||||
"pattern": "^(?=[a-z0-9-]*[a-z])[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"containerPort": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runAsRoot": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"replicas": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 10
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"size": {
|
||||
"enum": [
|
||||
"nano",
|
||||
"small",
|
||||
"medium",
|
||||
"large"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"healthCheck": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"path",
|
||||
"port",
|
||||
"initialDelaySeconds"
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"pattern": "^/"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
},
|
||||
"initialDelaySeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 600
|
||||
}
|
||||
}
|
||||
},
|
||||
"exposure": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"public": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"path": {
|
||||
"const": "/"
|
||||
}
|
||||
}
|
||||
},
|
||||
"secretRefs": {
|
||||
"type": "array",
|
||||
"maxItems": 0
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"serviceId",
|
||||
"alias",
|
||||
"protocol",
|
||||
"portName"
|
||||
],
|
||||
"properties": {
|
||||
"serviceId": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$"
|
||||
},
|
||||
"alias": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{0,48}$"
|
||||
},
|
||||
"protocol": {
|
||||
"const": "http"
|
||||
},
|
||||
"portName": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9](?:[-a-z0-9]{0,18}[a-z0-9])?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"contract": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"volumeAttachments": {
|
||||
"type": "array",
|
||||
"maxItems": 8,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"mountPath",
|
||||
"storageProfile",
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9](?:[-a-z0-9]{0,18}[a-z0-9])?$"
|
||||
},
|
||||
"mountPath": {
|
||||
"type": "string",
|
||||
"pattern": "^/(?!/).+"
|
||||
},
|
||||
"storageProfile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,31}$"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+(?:\\.[0-9]+)?(?:[EPTGMK]i?|m)?$"
|
||||
},
|
||||
"readOnly": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"required": [
|
||||
"exposure"
|
||||
],
|
||||
"properties": {
|
||||
"exposure": {
|
||||
"required": [
|
||||
"public"
|
||||
],
|
||||
"properties": {
|
||||
"public": {
|
||||
"const": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"required": [
|
||||
"labels"
|
||||
],
|
||||
"properties": {
|
||||
"labels": {
|
||||
"required": [
|
||||
"service"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"required": [
|
||||
"volumeAttachments"
|
||||
],
|
||||
"properties": {
|
||||
"volumeAttachments": {
|
||||
"minItems": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"replicas": {
|
||||
"const": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"runtime": {
|
||||
"properties": {
|
||||
"ports": {
|
||||
"minItems": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
251
templates/schemas/generic-http-service.v5.json
Normal file
251
templates/schemas/generic-http-service.v5.json
Normal file
@@ -0,0 +1,251 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/generic-http-service/v5",
|
||||
"title": "generic-http-service@v5",
|
||||
"description": "Port-free HTTP workload with headless discovery and independently managed networking.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"templateRef",
|
||||
"metadata",
|
||||
"runtime",
|
||||
"replicas",
|
||||
"resources"
|
||||
],
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"version"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "generic-http-service"
|
||||
},
|
||||
"version": {
|
||||
"const": "v5"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"const": "web"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"not": {
|
||||
"pattern": "^platform\\.example/"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"image",
|
||||
"resolvedImage"
|
||||
],
|
||||
"properties": {
|
||||
"image": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolvedImage": {
|
||||
"type": "string",
|
||||
"pattern": "^[^ @]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"command": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"args": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"runAsRoot": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"replicas": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 10
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"size": {
|
||||
"enum": [
|
||||
"nano",
|
||||
"small",
|
||||
"medium",
|
||||
"large"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"healthCheck": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"path",
|
||||
"port",
|
||||
"initialDelaySeconds"
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"pattern": "^/"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
},
|
||||
"initialDelaySeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 600
|
||||
}
|
||||
}
|
||||
},
|
||||
"secretRefs": {
|
||||
"type": "array",
|
||||
"maxItems": 0
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"serviceId",
|
||||
"alias",
|
||||
"protocol",
|
||||
"port"
|
||||
],
|
||||
"properties": {
|
||||
"serviceId": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$"
|
||||
},
|
||||
"alias": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{0,48}$"
|
||||
},
|
||||
"protocol": {
|
||||
"const": "http"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
},
|
||||
"routingMode": {
|
||||
"enum": [
|
||||
"headless",
|
||||
"clusterIP"
|
||||
],
|
||||
"default": "headless"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"contract": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"volumeAttachments": {
|
||||
"type": "array",
|
||||
"maxItems": 8,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"mountPath",
|
||||
"storageProfile",
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9](?:[-a-z0-9]{0,18}[a-z0-9])?$"
|
||||
},
|
||||
"mountPath": {
|
||||
"type": "string",
|
||||
"pattern": "^/(?!/).+"
|
||||
},
|
||||
"storageProfile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,31}$"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+(?:\\.[0-9]+)?(?:[EPTGMK]i?|m)?$"
|
||||
},
|
||||
"readOnly": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"required": [
|
||||
"volumeAttachments"
|
||||
],
|
||||
"properties": {
|
||||
"volumeAttachments": {
|
||||
"minItems": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"replicas": {
|
||||
"const": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
343
templates/schemas/generic-inference-service.v1.json
Normal file
343
templates/schemas/generic-inference-service.v1.json
Normal file
@@ -0,0 +1,343 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/generic-inference-service/v1",
|
||||
"title": "generic-inference-service@v1",
|
||||
"description": "Generic HTTP runtime that downloads a pinned Hugging Face model during pod startup",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"templateRef",
|
||||
"metadata",
|
||||
"runtime",
|
||||
"replicas",
|
||||
"resources",
|
||||
"healthCheck",
|
||||
"resolvedModel"
|
||||
],
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"version"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "generic-inference-service"
|
||||
},
|
||||
"version": {
|
||||
"const": "v1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"const": "inference"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"type": "string"
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"not": {
|
||||
"pattern": "^platform\\.example/"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"image",
|
||||
"resolvedImage",
|
||||
"ports"
|
||||
],
|
||||
"properties": {
|
||||
"image": {
|
||||
"type": "string"
|
||||
},
|
||||
"resolvedImage": {
|
||||
"type": "string",
|
||||
"pattern": "^[^ @]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"command": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"args": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"ports": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"containerPort"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"maxLength": 15,
|
||||
"pattern": "^(?=[a-z0-9-]*[a-z])[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"containerPort": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runAsRoot": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"allOf": [
|
||||
{
|
||||
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
||||
},
|
||||
{
|
||||
"not": {
|
||||
"const": "MODEL_PATH"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"replicas": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 10
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"size"
|
||||
],
|
||||
"properties": {
|
||||
"size": {
|
||||
"enum": [
|
||||
"nano",
|
||||
"small",
|
||||
"medium",
|
||||
"large"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"healthCheck": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"path",
|
||||
"port",
|
||||
"initialDelaySeconds"
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"pattern": "^/"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
},
|
||||
"initialDelaySeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 600
|
||||
}
|
||||
}
|
||||
},
|
||||
"exposure": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"public": {
|
||||
"const": false
|
||||
},
|
||||
"path": {
|
||||
"const": "/"
|
||||
}
|
||||
}
|
||||
},
|
||||
"secretRefs": {
|
||||
"type": "array",
|
||||
"maxItems": 0
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"serviceId",
|
||||
"alias",
|
||||
"protocol",
|
||||
"portName"
|
||||
],
|
||||
"properties": {
|
||||
"serviceId": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$"
|
||||
},
|
||||
"alias": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{0,48}$"
|
||||
},
|
||||
"protocol": {
|
||||
"const": "http"
|
||||
},
|
||||
"portName": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9](?:[-a-z0-9]{0,18}[a-z0-9])?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"contract": {
|
||||
"type": "object",
|
||||
"additionalProperties": false
|
||||
},
|
||||
"resolvedModel": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"source"
|
||||
],
|
||||
"properties": {
|
||||
"source": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"type",
|
||||
"repoId",
|
||||
"commit"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "huggingface"
|
||||
},
|
||||
"repoId": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*$",
|
||||
"maxLength": 256
|
||||
},
|
||||
"commit": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-f]{40}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"credentialRef": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"pattern": "^[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?$"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"required": [
|
||||
"exposure"
|
||||
],
|
||||
"properties": {
|
||||
"exposure": {
|
||||
"required": [
|
||||
"public"
|
||||
],
|
||||
"properties": {
|
||||
"public": {
|
||||
"const": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"metadata": {
|
||||
"required": [
|
||||
"labels"
|
||||
],
|
||||
"properties": {
|
||||
"labels": {
|
||||
"required": [
|
||||
"service"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"required": [
|
||||
"volumeAttachments"
|
||||
],
|
||||
"properties": {
|
||||
"volumeAttachments": {
|
||||
"minItems": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"replicas": {
|
||||
"const": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"runtime": {
|
||||
"properties": {
|
||||
"ports": {
|
||||
"minItems": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
123
templates/schemas/minio-service.v1.json
Normal file
123
templates/schemas/minio-service.v1.json
Normal file
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/minio-service/v1",
|
||||
"title": "minio-service@v1",
|
||||
"description": "Distributed MinIO object storage (legacy support level); objects are built by the cluster gateway",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "minio-service"
|
||||
},
|
||||
"version": {
|
||||
"const": "v1"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"version"
|
||||
]
|
||||
},
|
||||
"engineVersion": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 64
|
||||
},
|
||||
"image": {
|
||||
"type": "string",
|
||||
"pattern": "^[^\\s]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"bucket": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{1,61}[a-z0-9]$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"bucket"
|
||||
]
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile"
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"pattern": "^[1-9][0-9]*(Mi|Gi|Ti)$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile",
|
||||
"size"
|
||||
]
|
||||
},
|
||||
"backup": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile"
|
||||
]
|
||||
},
|
||||
"restoreFrom": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"instanceId": {
|
||||
"type": "string",
|
||||
"pattern": "^ds-[a-f0-9]{32}$"
|
||||
},
|
||||
"backupId": {
|
||||
"type": "string",
|
||||
"pattern": "^op-[a-f0-9]{32}$"
|
||||
},
|
||||
"targetTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"instanceId",
|
||||
"backupId"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"templateRef",
|
||||
"engineVersion",
|
||||
"image",
|
||||
"parameters",
|
||||
"resources",
|
||||
"storage",
|
||||
"backup"
|
||||
]
|
||||
}
|
||||
78
templates/schemas/minio-service.v2.json
Normal file
78
templates/schemas/minio-service.v2.json
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/minio-service/v2",
|
||||
"title": "minio-service@v2",
|
||||
"description": "Standalone service with one engine container and one retained volume; no HA or operator required.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "minio-service"
|
||||
},
|
||||
"version": {
|
||||
"const": "v2"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"version"
|
||||
]
|
||||
},
|
||||
"engineVersion": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 64
|
||||
},
|
||||
"image": {
|
||||
"type": "string",
|
||||
"pattern": "^[^\\s]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {}
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile"
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"pattern": "^[1-9][0-9]*(Mi|Gi|Ti)$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile",
|
||||
"size"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"templateRef",
|
||||
"engineVersion",
|
||||
"image",
|
||||
"resources",
|
||||
"storage"
|
||||
]
|
||||
}
|
||||
123
templates/schemas/postgresql-service.v1.json
Normal file
123
templates/schemas/postgresql-service.v1.json
Normal file
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/postgresql-service/v1",
|
||||
"title": "postgresql-service@v1",
|
||||
"description": "PostgreSQL cluster managed by CloudNativePG; objects are built by the cluster gateway",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "postgresql-service"
|
||||
},
|
||||
"version": {
|
||||
"const": "v1"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"version"
|
||||
]
|
||||
},
|
||||
"engineVersion": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 64
|
||||
},
|
||||
"image": {
|
||||
"type": "string",
|
||||
"pattern": "^[^\\s]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"database": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9_]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"database"
|
||||
]
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile"
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"pattern": "^[1-9][0-9]*(Mi|Gi|Ti)$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile",
|
||||
"size"
|
||||
]
|
||||
},
|
||||
"backup": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile"
|
||||
]
|
||||
},
|
||||
"restoreFrom": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"instanceId": {
|
||||
"type": "string",
|
||||
"pattern": "^ds-[a-f0-9]{32}$"
|
||||
},
|
||||
"backupId": {
|
||||
"type": "string",
|
||||
"pattern": "^op-[a-f0-9]{32}$"
|
||||
},
|
||||
"targetTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"instanceId",
|
||||
"backupId"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"templateRef",
|
||||
"engineVersion",
|
||||
"image",
|
||||
"parameters",
|
||||
"resources",
|
||||
"storage",
|
||||
"backup"
|
||||
]
|
||||
}
|
||||
87
templates/schemas/postgresql-service.v2.json
Normal file
87
templates/schemas/postgresql-service.v2.json
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/postgresql-service/v2",
|
||||
"title": "postgresql-service@v2",
|
||||
"description": "Standalone service with one engine container and one retained volume; no HA or operator required.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "postgresql-service"
|
||||
},
|
||||
"version": {
|
||||
"const": "v2"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"version"
|
||||
]
|
||||
},
|
||||
"engineVersion": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 64
|
||||
},
|
||||
"image": {
|
||||
"type": "string",
|
||||
"pattern": "^[^\\s]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"database": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9_]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"database"
|
||||
]
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile"
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"pattern": "^[1-9][0-9]*(Mi|Gi|Ti)$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile",
|
||||
"size"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"templateRef",
|
||||
"engineVersion",
|
||||
"image",
|
||||
"resources",
|
||||
"storage",
|
||||
"parameters"
|
||||
]
|
||||
}
|
||||
170
templates/schemas/redis-service.v1.json
Normal file
170
templates/schemas/redis-service.v1.json
Normal file
@@ -0,0 +1,170 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/redis-service/v1",
|
||||
"title": "redis-service@v1",
|
||||
"description": "Redis replication with Sentinel; objects are built by the cluster gateway",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "redis-service"
|
||||
},
|
||||
"version": {
|
||||
"const": "v1"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"version"
|
||||
]
|
||||
},
|
||||
"engineVersion": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 64
|
||||
},
|
||||
"image": {
|
||||
"type": "string",
|
||||
"pattern": "^[^\\s]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"mode": {
|
||||
"enum": [
|
||||
"cache",
|
||||
"persistent"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"mode"
|
||||
]
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile"
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"pattern": "^[1-9][0-9]*(Mi|Gi|Ti)$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile",
|
||||
"size"
|
||||
]
|
||||
},
|
||||
"backup": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile"
|
||||
]
|
||||
},
|
||||
"restoreFrom": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"instanceId": {
|
||||
"type": "string",
|
||||
"pattern": "^ds-[a-f0-9]{32}$"
|
||||
},
|
||||
"backupId": {
|
||||
"type": "string",
|
||||
"pattern": "^op-[a-f0-9]{32}$"
|
||||
},
|
||||
"targetTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"instanceId",
|
||||
"backupId"
|
||||
]
|
||||
},
|
||||
"sentinelImage": {
|
||||
"type": "string",
|
||||
"pattern": "^[^\\s]+@sha256:[a-f0-9]{64}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"templateRef",
|
||||
"engineVersion",
|
||||
"image",
|
||||
"parameters",
|
||||
"resources",
|
||||
"sentinelImage"
|
||||
],
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"parameters": {
|
||||
"properties": {
|
||||
"mode": {
|
||||
"const": "persistent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"storage",
|
||||
"backup"
|
||||
]
|
||||
},
|
||||
"else": {
|
||||
"not": {
|
||||
"anyOf": [
|
||||
{
|
||||
"required": [
|
||||
"storage"
|
||||
]
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"backup"
|
||||
]
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"restoreFrom"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
78
templates/schemas/redis-service.v2.json
Normal file
78
templates/schemas/redis-service.v2.json
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://platform.example/templates/redis-service/v2",
|
||||
"title": "redis-service@v2",
|
||||
"description": "Standalone service with one engine container and one retained volume; no HA or operator required.",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"templateRef": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"const": "redis-service"
|
||||
},
|
||||
"version": {
|
||||
"const": "v2"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"version"
|
||||
]
|
||||
},
|
||||
"engineVersion": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 64
|
||||
},
|
||||
"image": {
|
||||
"type": "string",
|
||||
"pattern": "^[^\\s]+@sha256:[a-f0-9]{64}$"
|
||||
},
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {}
|
||||
},
|
||||
"resources": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile"
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,62}$"
|
||||
},
|
||||
"size": {
|
||||
"type": "string",
|
||||
"pattern": "^[1-9][0-9]*(Mi|Gi|Ti)$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"profile",
|
||||
"size"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"templateRef",
|
||||
"engineVersion",
|
||||
"image",
|
||||
"resources",
|
||||
"storage"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user