This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathv2.schema.json
231 lines (231 loc) · 9.13 KB
/
v2.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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/LiveRamp/kube_deploy_tools/tree/master/schemas/v2.schema.json",
"type": "object",
"title": "Deploy configuration",
"version": "2.1.0",
"description": "The deploy schema is used by kube_deploy_tools to configure itself.",
"default": {},
"required": [
"artifacts",
"image_registries",
"version"
],
"properties": {
"artifacts": {
"type": "array",
"title": "artifacts",
"description": "Any usage of kdt must involve at least one artifact. These artifacts can help you create permutations of your deploy with slightly different configurations.",
"minItems": 1,
"items": {
"$ref": "#/definitions/artifact"
}
},
"artifact_registries": {
"$id": "#/properties/artifact_registries",
"type": "array",
"title": "Artifact registries",
"description": "A deploy configuration requires at least one artifact registry. The image registry tells `kdt publish` how to store your deploy artifacts and tells `kdt deploy` where to find them.",
"minItems": 1,
"items": {
"$ref": "#/definitions/artifact_registry"
}
},
"default_flags": {
"$ref": "#/definitions/flags"
},
"exclude_dir": {
"type": "array",
"title": "Directory exclusions",
"description": "Exclude these directory globs underneath `kubernetes/` from this artifact. Do not use together with `include_dir`.",
"items": {
"type": "string"
}
},
"flavors": {
"type": "object",
"title": "flavors",
"description": "The flavor is the most granular dimension for customizing the output of your Kubernetes manifests. Specify flavor names and associated flags in this field.",
"additionalProperties": true
},
"hooks": {
"$id": "#/properties/hooks",
"type": "array",
"title": "The hooks schema",
"description": "An explanation about the purpose of this instance.",
"default": [
"default"
],
"items": {
"type": "string"
}
},
"image_registries": {
"$id": "#/properties/image_registries",
"type": "array",
"title": "Image registries",
"description": "A deploy configuration requires at least one image registry. The image registry tells `kdt push` how to retag and push your images and tells `kdt generate` what to populate for `config['image_registry']`.",
"items": {
"$ref": "#/definitions/image_registry"
}
},
"include_dir": {
"type": "array",
"title": "Directory inclusions",
"description": "Include only these directory globs underneath `kubernetes/` into this artifact. Do not use with `exclude_dir` together.",
"items": {
"type": "string"
}
},
"version": {
"type": "integer",
"title": "version",
"description": "Specify the major version of the deploy schema that you are using. The current version is 2.",
"default": 2
}
},
"definitions": {
"artifact": {
"type": "object",
"title": "artifact",
"description": "An explanation about the purpose of this instance.",
"default": {},
"examples": [
{
"name": "local",
"image_registry": "local",
"flags": {
"cool_config_value": "foobar"
}
}
],
"required": [
"image_registry",
"name"
],
"properties": {
"flags": {
"$ref": "#/definitions/flags"
},
"image_registry": {
"type": "string",
"title": "image_registry",
"description": "Each artifact must specify the `name` of a value in `image_registries` to be used for images relating to this artifact.",
"default": "",
"examples": [
"local"
]
},
"name": {
"type": "string",
"title": "The name schema",
"description": "The unique name of the artifact. Among other places, this ends up showing up in `build/kubernetes/<NAME>_<FLAVOR>`.",
"default": "",
"examples": [
"local-staging"
]
}
}
},
"artifact_registry": {
"type": "object",
"title": "Artifact Registry",
"description": "An artifact registry is the instantiation of an artifact registry driver, configuration for that driver, and a unique name.",
"default": {},
"examples": [
{
"driver": "artifactory",
"name": "artifactory",
"config": {
"endpoint": "https://build.my-corp.com/artifactory",
"repo": "kubernetes-snapshot-local"
}
}
],
"required": [
"driver",
"name"
],
"properties": {
"config": {
"type": "object",
"title": "Artifact registry configuration",
"description": "Driver-specific key-value pairs used to configure this artifact registry.",
"additionalProperties": true
},
"driver": {
"type": "string",
"title": "Artifact registry driver",
"description": "Select a driver to use for this artifact registry. Supported destinations are `gcs` (Google Cloud Storage) and `artifactory`.",
"enum": [
"artifactory",
"gcs"
]
},
"name": {
"type": "string",
"title": "Artifact registry name",
"description": "A unique name for this artifact registry."
}
}
},
"flags": {
"type": "object",
"title": "flags",
"description": "flags are used in various parts of the deploy schema to specify key-value pairs that will be placed into `config`. In ascending order, the precedence of flags overwriting each other are: `default_flags`, flags of an `artifact`, then flags of a `flavor`.",
"additionalProperties": true
},
"image_registry": {
"type": "object",
"title": "Image Registry",
"description": "An image registry is the instantiation of an image registry driver, configuration for that driver, and a unique name.",
"default": {},
"examples": [
{
"driver": "gcp",
"name": "gcp",
"prefix": "gcr.io/my-gcr-project"
}
],
"required": [
"driver",
"name",
"prefix"
],
"properties": {
"config": {
"type": "object",
"title": "Image registry configuration",
"description": "Driver-specific key-value pairs used to configure this image registry.",
"additionalProperties": true
},
"driver": {
"type": "string",
"title": "Image registry driver",
"description": "Select a driver to use for this image registry. Supported destinations are local (no-op), AWS ECR, and GCP GCR.",
"enum": [
"aws",
"gcp",
"noop"
]
},
"name": {
"type": "string",
"title": "Image registry name",
"description": "A unique name for this image registry."
},
"prefix": {
"type": "string",
"title": "Image registry prefix",
"description": "Images tagged with local-registry will be retagged with this prefix and an appropriate version tag.",
"default": "",
"examples": [
"gcr.io/my-gcr-project",
"local-registry",
"123456789.dkr.ecr.amazonaws.com"
]
}
}
}
}
}