-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
config-schema.json
456 lines (456 loc) · 13.6 KB
/
config-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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/kubecolor/kubecolor/raw/main/config-schema.json",
"$defs": {
"color": {
"type": "string",
"title": "Color",
"description": "A single color style, optionally setting foreground (text) color, background color, and/or modifier such as 'bold'.",
"default": "none",
"examples": [
"none",
"red",
"green",
"yellow",
"blue",
"magenta",
"cyan",
"white",
"black",
"240",
"aaff00",
"#aaff00",
"rgb(192, 255, 238)",
"raw(4;53)",
"gray:italic",
"fg=white:bold:underline",
"fg=yellow:bg=red:bold"
]
},
"colorSlice": {
"type": "string",
"title": "Multiple colors",
"description": "Allows multiple separate colors to be applied, separated by slash.",
"examples": [
"red/green/blue",
"bg=red:underline/bg=green:italic/bg=blue:bold"
]
},
"duration": {
"type": "string",
"title": "Time duration",
"description": "A string value representing a time span, formatted as a Go time duration.",
"default": "0",
"examples": [
"30s",
"5m",
"10m",
"1h30m",
"5h"
]
},
"paging": {
"type": "string",
"enum": [
"auto",
"never"
],
"title": "Paging mode preference",
"description": "Whether to pipe supported subcommands to a pager (\"auto\" or \"never\")",
"default": "never"
},
"preset": {
"type": "string",
"enum": [
"none",
"dark",
"light",
"protanopia-dark",
"protanopia-light",
"deuteranopia-dark",
"deuteranopia-light",
"tritanopia-dark",
"tritanopia-light",
"pre-0.3.0-dark",
"pre-0.3.0-light",
"pre-0.0.21-dark",
"pre-0.0.21-light"
],
"title": "Color theme preset",
"description": "Preset is a set of defaults for the color theme.",
"default": "dark"
},
"theme": {
"properties": {
"base": {
"$ref": "#/$defs/themeBase",
"description": "Base colors must be first so they're applied first"
},
"default": {
"$ref": "#/$defs/color",
"description": "default when no specific mapping is found for the command"
},
"shell": {
"$ref": "#/$defs/themeShell",
"description": "colors for representing shells (e.g bash, zsh, etc)"
},
"data": {
"$ref": "#/$defs/themeData",
"description": "colors for representing data"
},
"status": {
"$ref": "#/$defs/themeStatus",
"description": "generic status coloring (e.g \"Ready\", \"Terminating\")"
},
"table": {
"$ref": "#/$defs/themeTable",
"description": "used in table output, e.g \"kubectl get\" and parts of \"kubectl describe\""
},
"stderr": {
"$ref": "#/$defs/themeStderr",
"description": "used in kubectl's stderr output"
},
"describe": {
"$ref": "#/$defs/themeDescribe",
"description": "used in \"kubectl describe\""
},
"apply": {
"$ref": "#/$defs/themeApply",
"description": "used in \"kubectl apply\""
},
"explain": {
"$ref": "#/$defs/themeExplain",
"description": "used in \"kubectl explain\""
},
"options": {
"$ref": "#/$defs/themeOptions",
"description": "used in \"kubectl options\""
},
"version": {
"$ref": "#/$defs/themeVersion",
"description": "used in \"kubectl version\""
},
"help": {
"$ref": "#/$defs/themeHelp",
"description": "used in \"kubectl --help\""
}
},
"additionalProperties": false,
"type": "object",
"description": "Theme is the root theme config."
},
"themeApply": {
"properties": {
"created": {
"$ref": "#/$defs/color",
"description": "used on \"deployment.apps/foo created\""
},
"configured": {
"$ref": "#/$defs/color",
"description": "used on \"deployment.apps/bar configured\""
},
"unchanged": {
"$ref": "#/$defs/color",
"description": "used on \"deployment.apps/quux unchanged\""
},
"dryRun": {
"$ref": "#/$defs/color",
"description": "used on \"deployment.apps/quux created (dry-run)\""
},
"fallback": {
"$ref": "#/$defs/color",
"description": "used when \"kubectl apply\" outputs unknown format"
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeApply holds colors for the \"kubectl apply\" output."
},
"themeBase": {
"properties": {
"info": {
"$ref": "#/$defs/color",
"description": "general color for when things are informational"
},
"primary": {
"$ref": "#/$defs/color",
"description": "general color for when things are focus"
},
"secondary": {
"$ref": "#/$defs/color",
"description": "general color for when things are secondary focus"
},
"success": {
"$ref": "#/$defs/color",
"description": "general color for when things are good"
},
"warning": {
"$ref": "#/$defs/color",
"description": "general color for when things are wrong"
},
"danger": {
"$ref": "#/$defs/color",
"description": "general color for when things are bad"
},
"muted": {
"$ref": "#/$defs/color",
"description": "general color for when things are less relevant"
},
"key": {
"$ref": "#/$defs/colorSlice",
"description": "general color for keys"
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeBase contains base colors that other theme fields can default to, just to make overriding themes easier."
},
"themeData": {
"properties": {
"key": {
"$ref": "#/$defs/colorSlice",
"description": "used for the key"
},
"string": {
"$ref": "#/$defs/color",
"description": "used when value is a string"
},
"true": {
"$ref": "#/$defs/color",
"description": "used when value is true"
},
"false": {
"$ref": "#/$defs/color",
"description": "used when value is false"
},
"number": {
"$ref": "#/$defs/color",
"description": "used when the value is a number"
},
"null": {
"$ref": "#/$defs/color",
"description": "used when the value is null, nil, or none"
},
"quantity": {
"$ref": "#/$defs/color",
"description": "used when the value is a quantity, e.g \"100m\" or \"5Gi\""
},
"duration": {
"$ref": "#/$defs/color",
"description": "used when the value is a duration, e.g \"12m\" or \"1d12h\""
},
"durationFresh": {
"$ref": "#/$defs/color",
"description": "color used when the time value is under a certain delay"
},
"ratio": {
"$ref": "#/$defs/themeDataRatio"
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeData holds colors for when representing parsed data."
},
"themeDataRatio": {
"properties": {
"zero": {
"$ref": "#/$defs/color",
"description": "used for \"0/0\""
},
"equal": {
"$ref": "#/$defs/color",
"description": "used for \"n/n\", e.g \"1/1\""
},
"unequal": {
"$ref": "#/$defs/color",
"description": "used for \"n/m\", e.g \"0/1\""
}
},
"additionalProperties": false,
"type": "object"
},
"themeDescribe": {
"properties": {
"key": {
"$ref": "#/$defs/colorSlice",
"description": "used on keys. The multiple colors are cycled based on indentation."
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeApply holds colors for the \"kubectl apply\" output."
},
"themeExplain": {
"properties": {
"key": {
"$ref": "#/$defs/colorSlice",
"description": "used on keys. The multiple colors are cycled based on indentation."
},
"required": {
"$ref": "#/$defs/color",
"description": "used on the trailing \"-required-\" string"
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeExplain holds colors for the \"kubectl explain\" output."
},
"themeHelp": {
"properties": {
"header": {
"$ref": "#/$defs/color",
"description": "e.g \"Examples:\" or \"Options:\""
},
"flag": {
"$ref": "#/$defs/color",
"description": "e.g \"--kubeconfig\""
},
"flagDesc": {
"$ref": "#/$defs/color",
"description": "Flag descripion under \"Options:\" heading"
},
"url": {
"$ref": "#/$defs/color",
"description": "e.g `[https://example.com]`"
},
"text": {
"$ref": "#/$defs/color",
"description": "Fallback text color"
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeHelp holds colors for the \"kubectl --help\" output."
},
"themeOptions": {
"properties": {
"flag": {
"$ref": "#/$defs/color",
"description": "e.g \"--kubeconfig\""
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeOptions holds colors for the \"kubectl options\" output."
},
"themeShell": {
"properties": {
"comment": {
"$ref": "#/$defs/color",
"description": "used on comments, e.g `# this is a comment`"
},
"command": {
"$ref": "#/$defs/color",
"description": "used on commands, e.g `kubectl` or `echo`"
},
"arg": {
"$ref": "#/$defs/color",
"description": "used on arguments, e.g `get pods` in `kubectl get pods`"
},
"flag": {
"$ref": "#/$defs/color",
"description": "used on flags, e.g `--watch` in `kubectl get pods --watch`"
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeShell holds colors for when representing shell commands (bash, zsh, etc)"
},
"themeStatus": {
"properties": {
"success": {
"$ref": "#/$defs/color",
"description": "used in status keywords, e.g \"Running\", \"Ready\""
},
"warning": {
"$ref": "#/$defs/color",
"description": "used in status keywords, e.g \"Terminating\""
},
"error": {
"$ref": "#/$defs/color",
"description": "used in status keywords, e.g \"Failed\", \"Unhealthy\""
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeStatus holds colors for status texts, used in for example the \"kubectl get\" status column"
},
"themeStderr": {
"properties": {
"default": {
"$ref": "#/$defs/color",
"description": "default when no specific mapping is found for the output line"
},
"error": {
"$ref": "#/$defs/color",
"description": "e.g when text contains \"error\""
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeStderr holds generic colors for kubectl's stderr output."
},
"themeTable": {
"properties": {
"header": {
"$ref": "#/$defs/color",
"description": "used on table headers"
},
"columns": {
"$ref": "#/$defs/colorSlice",
"description": "used on table columns when no other coloring applies such as status or duration coloring. The multiple colors are cycled based on column ID, from left to right."
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeTable holds colors for table output"
},
"themeVersion": {
"properties": {
"key": {
"$ref": "#/$defs/colorSlice",
"description": "used on the key"
}
},
"additionalProperties": false,
"type": "object",
"description": "ThemeVersion holds colors for the \"kubectl version\" output."
}
},
"properties": {
"kubectl": {
"type": "string",
"description": "Which kubectl executable to use",
"default": "kubectl",
"examples": [
"kubectl1.19",
"oc"
]
},
"objFreshThreshold": {
"$ref": "#/$defs/duration",
"description": "Ages below this uses theme.data.durationfresh coloring"
},
"preset": {
"$ref": "#/$defs/preset",
"description": "Color theme preset"
},
"theme": {
"$ref": "#/$defs/theme"
},
"pager": {
"type": "string",
"description": "Command to use as pager",
"examples": [
"less -RF",
"more"
]
},
"paging": {
"$ref": "#/$defs/paging",
"description": "Whether to enable paging: \"auto\" or \"never\""
}
},
"additionalProperties": false,
"type": "object"
}