Skip to content

Commit d21ad94

Browse files
marcelstoerpre-commit-ci[bot]hyperupcall
authored
Add ti&m CDK schemas (SchemaStore#4701)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Edwin Kofler <[email protected]>
1 parent fe8e86f commit d21ad94

File tree

5 files changed

+884
-0
lines changed

5 files changed

+884
-0
lines changed

src/api/json/catalog.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8092,6 +8092,36 @@
80928092
"fileMatch": [".aider.conf.yml"],
80938093
"url": "https://json.schemastore.org/aider-0.82.json"
80948094
},
8095+
{
8096+
"name": "CDK Environment Manager, environment definition",
8097+
"description": "ti&m CDK Environment Manager environment definition file",
8098+
"fileMatch": [
8099+
"**/environment-definition.json",
8100+
"**/environment-definition.yaml",
8101+
"**/environment-definition.yml"
8102+
],
8103+
"url": "https://json.schemastore.org/ti8m-cdk-environment-definition.json"
8104+
},
8105+
{
8106+
"name": "CDK Environment Manager, concrete environments definition",
8107+
"description": "ti&m CDK Environment Manager concrete environments definition file",
8108+
"fileMatch": [
8109+
"**/concrete-environments.json",
8110+
"**/concrete-environments.yaml",
8111+
"**/concrete-environments.yml"
8112+
],
8113+
"url": "https://json.schemastore.org/ti8m-cdk-concrete-environments.json"
8114+
},
8115+
{
8116+
"name": "CDK Environment Manager, concrete environment configuration",
8117+
"description": "ti&m CDK Environment Manager concrete environment configuration file",
8118+
"fileMatch": [
8119+
"**/environment_config/*.json",
8120+
"**/environment_config/*.yaml",
8121+
"**/environment_config/*.yml"
8122+
],
8123+
"url": "https://json.schemastore.org/ti8m-cdk-concrete-environment-config.json"
8124+
},
80958125
{
80968126
"name": "tm_devices configuration file",
80978127
"description": "Definition of the configuration file of the tm_devices Python package. Documentation: https://tm-devices.readthedocs.io/stable/configuration/",

src/schema-validation.jsonc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,15 @@
11371137
"template.json": {
11381138
"unknownKeywords": ["deprecationMessage", "sources"]
11391139
},
1140+
"ti8m-cdk-concrete-environment-config.json": {
1141+
"externalSchema": ["ti8m-cdk-environment-definition.json"]
1142+
},
1143+
"ti8m-cdk-concrete-environments.json": {
1144+
"externalSchema": [
1145+
"ti8m-cdk-concrete-environment-config.json",
1146+
"ti8m-cdk-environment-definition.json"
1147+
]
1148+
},
11401149
"toolinfo.1.1.0.json": {
11411150
"externalSchema": ["licenses.1.json"],
11421151
"unknownKeywords": ["authors", "version"]
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://json.schemastore.org/ti8m-cdk-concrete-environment-config.json",
4+
"title": "Concrete Environment Config",
5+
"description": "Defines the concrete environment configuration",
6+
"type": "object",
7+
"allOf": [
8+
{
9+
"$ref": "#/definitions/concrete-environment-spec"
10+
}
11+
],
12+
"definitions": {
13+
"concrete-environment-spec": {
14+
"type": "object",
15+
"additionalProperties": {
16+
"$ref": "https://json.schemastore.org/ti8m-cdk-environment-definition.json#/definitions/serviceConfiguration",
17+
"description": "per-service overrides"
18+
},
19+
"properties": {
20+
"image-pull-secret": {
21+
"type": "string",
22+
"description": "the secret credentials type to authenticate against a private Docker registry, NOT the credentials itself"
23+
},
24+
"server": {
25+
"type": "string"
26+
},
27+
"includes": {
28+
"type": "array",
29+
"items": {
30+
"type": "string"
31+
}
32+
},
33+
"global-template-parameters": {
34+
"type": "array",
35+
"items": {
36+
"$ref": "https://json.schemastore.org/ti8m-cdk-environment-definition.json#/definitions/templateParameter"
37+
}
38+
},
39+
"template-parameters": {
40+
"type": "array",
41+
"items": {
42+
"$ref": "https://json.schemastore.org/ti8m-cdk-environment-definition.json#/definitions/templateParameter"
43+
}
44+
},
45+
"hostname": {
46+
"type": "string",
47+
"description": "DNS name by which this concrete environment can be reached"
48+
},
49+
"target": {
50+
"description": "type of the target environment",
51+
"enum": ["docker-compose", "openshift", "kubernetes"]
52+
},
53+
"remote-project": {
54+
"type": "string",
55+
"description": "the name of the project/namespace in a cloud manager like kubernetes. Defaults to the name of the environment."
56+
},
57+
"resource-quota": {
58+
"$ref": "https://json.schemastore.org/ti8m-cdk-environment-definition.json#/definitions/resourceSpec",
59+
"type": "object",
60+
"description": "Specifies resource usage of a container instance"
61+
},
62+
"route-mode": {
63+
"type": "string",
64+
"description": "The mode of the route for openshift. If it is not set the normal routing is used.",
65+
"enum": ["service-mesh"]
66+
},
67+
"tags": {
68+
"type": "object",
69+
"description": "the tags for the images referenced in the environment definition",
70+
"additionalProperties": {
71+
"type": "string",
72+
"description": "tag value"
73+
}
74+
},
75+
"critical": {
76+
"type": "boolean",
77+
"description": "Defines if it's a critical environment to deploy on. If so a prompt is shown."
78+
},
79+
"include": {
80+
"type": "array",
81+
"description": "List of service names or aliases, which should be instantiated in this specific environment. If set no other services from environment-definition will be loaded",
82+
"items": {
83+
"type": "string"
84+
}
85+
},
86+
"exclusions": {
87+
"type": "array",
88+
"description": "List of service names or aliases, which should *not* be instantiated in this specific environment",
89+
"items": {
90+
"type": "string"
91+
}
92+
},
93+
"config-set": {
94+
"type": "object",
95+
"description": "environment-specific additions and overrides for configuration sets",
96+
"additionalProperties": {
97+
"type": "object",
98+
"description": "per-config-set overrides",
99+
"allOf": [
100+
{
101+
"$ref": "https://json.schemastore.org/ti8m-cdk-environment-definition.json#/definitions/serviceConfiguration"
102+
}
103+
]
104+
}
105+
}
106+
}
107+
}
108+
}
109+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://json.schemastore.org/ti8m-cdk-concrete-environments.json",
4+
"title": "Concrete Environments Lists",
5+
"description": "List of concrete instances (stages) of an environment",
6+
"type": "object",
7+
"properties": {
8+
"$schema": {
9+
"type": "string"
10+
},
11+
"all": {
12+
"$ref": "https://json.schemastore.org/ti8m-cdk-concrete-environment-config.json#/definitions/concrete-environment-spec",
13+
"type": "object",
14+
"description": "Common default definitions for all environments which may be overridden by individual environments"
15+
}
16+
},
17+
"additionalProperties": {
18+
"type": "object",
19+
"description": "definitions for one specific environment",
20+
"anyOf": [
21+
{
22+
"$ref": "https://json.schemastore.org/ti8m-cdk-concrete-environment-config.json#/definitions/concrete-environment-spec"
23+
},
24+
{
25+
"type": "object",
26+
"description": "Reference to a concrete environment definition defined in a separate json file",
27+
"properties": {
28+
"$ref": {
29+
"oneOf": [
30+
{ "type": "string" },
31+
{ "type": "array", "items": { "type": "string" } }
32+
],
33+
"examples": [
34+
"environments/local.json",
35+
"[\"environments/common.json\",\n\"environments/local.json\"]"
36+
]
37+
}
38+
}
39+
}
40+
]
41+
}
42+
}

0 commit comments

Comments
 (0)