-
Notifications
You must be signed in to change notification settings - Fork 251
/
Copy pathapplication_configuration.schema.json
210 lines (210 loc) · 8.29 KB
/
application_configuration.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http:/oam.dev/v1/oam.application_configuration.schema.json",
"title": "Open Application Model Application Configuration JSON Schema",
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"description": "The specific version of the Open Application Model specification in use. This version of the specification covers apiVersions in core.oam.dev/v1alpha1."
},
"kind": {
"type": "string",
"description": "For an application configuration schematic, must be ApplicationConfiguration.",
"enum": [
"ApplicationConfiguration"
]
},
"metadata": {
"type": "object",
"description": "Application configuration metadata.",
"properties": {
"name": {
"type": "string"
},
"labels": {
"type": "object",
"description": "A set of string key/value pairs used as arbitrary labels on this application configuration.",
"additionalProperties": {
"type": "string"
}
},
"annotations": {
"type": "object",
"description": "A set of string key/value pairs used as arbitrary annotations on this application configuration.",
"additionalProperties": {
"type": "string"
}
}
}
},
"spec": {
"type": "object",
"description": "A container for exposing application configuration attributes.",
"additionalProperties": {
"$ref": "#/definitions/operationalConfigurationSpec"
}
}
},
"required": [
"apiVersion",
"kind",
"metadata",
"spec"
],
"additionalProperties": false,
"definitions": {
"operationalConfigurationSpec": {
"variables": {
"type": "array",
"description": "Variables that can be referenced in parameter values and properties.",
"items": {
"$ref": "#/definitions/opconfigVariable"
}
},
"scopes": {
"type": "array",
"description": "Application scope definitions.",
"items": {
"$ref": "#/definitions/applicationScope"
}
},
"components": {
"type": "array",
"description": "Component instance definitions.",
"items": {
"$ref": "#/definitions/componentInstance"
}
},
"required": [],
"additionalProperties": false
},
"opconfigVariable": {
"type": "object",
"description": "The Variables section defines variables that may be used elsewhere in the application configuration. The variable section provides a way for an application operator to specify common values that can be substituted into multiple other locations in this configuration (using the [fromVariable(VARNAME)] syntax).",
"properties": {
"name": {
"type": "string",
"description": "The parameter's name. Must be unique per configuration.",
"$comment": "Some systems have upper bounds for name length. Do we limit here?",
"maxLength": 128
},
"value": {
"type": "string",
"description": "The scalar value."
}
},
"required": [
"name",
"value"
],
"additionalProperties": false
},
"applicationScope": {
"type": "object",
"description": "The scope section defines application scopes that will be created with this application configuration.",
"properties": {
"name": {
"type": "string",
"description": "The name of the application scope. Must be unique to the deployment environment."
},
"type": {
"type": "string",
"description": "The fully-qualified GROUP/VERSION.KIND name of the application scope."
},
"properties": {
"type": "object",
"description": "The properties attached to this scope.",
"additionalProperties": {
"$ref": "#/definitions/propertiesObject"
}
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
},
"componentInstance": {
"type": "object",
"description": "This section defines the instances of components to create with this application configuration.",
"properties": {
"componentName": {
"type": "string",
"description": "The name of the component to create an instance of."
},
"instanceName": {
"type": "string",
"description": "The name of the instance of this component."
},
"parameterValues": {
"type": "array",
"description": "Overrides of parameters that are exposed by the application scope type defined in 'type'.",
"items": {
"$ref": "#/definitions/parameterValue"
}
},
"traits": {
"type": "array",
"description": "Specifies the traits to attach to this component instance.",
"items": {
"$ref": "#/definitions/trait"
}
}
},
"required": [
"componentName",
"instanceName"
],
"additionalProperties": false
},
"parameterValue": {
"type": "object",
"description": "Values supplied to parameters that are used to override the parameters exposed by other types.",
"properties": {
"name": {
"type": "string",
"description": "The name of the component parameter to provide a value for.",
"$comment": "Some systems have upper bounds for name length. Do we limit here?",
"maxLength": 128
},
"value": {
"type": "string",
"description": "The value of this parameter."
}
},
"required": [
"name"
],
"additionalProperties": false
},
"trait": {
"type": "object",
"description": "The trait section defines traits that will be used in a component instance.",
"properties": {
"name": {
"type": "string",
"description": "The name of the trait instance. Must be unique to the deployment environment."
},
"properties": {
"type": "object",
"description": "Overrides of parameters that are exposed by the trait type defined in 'type'.",
"additionalProperties": {
"$ref": "#/definitions/propertiesObject"
}
}
},
"required": [
"name"
],
"additionalProperties": false
},
"propertiesObject": {
"type": "object",
"description": "A properties object (for trait and scope configuration) is an object whose structure is determined by the trait or scope property schema. It may be a simple value, or it may be a complex object.",
"properties": {},
"additionalProperties": true
}
}
}