Skip to content

Commit df5d56a

Browse files
authored
Update config reference for v0.6.0, and fix typos (#22)
1 parent a439128 commit df5d56a

5 files changed

Lines changed: 162 additions & 110 deletions

File tree

src/content/docs/customizing/themes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ you can switch to the light theme by either:
9292
</Tabs>
9393

9494
:::note
95-
Kubecolor does not do any automatic detection for wether light
95+
Kubecolor does not do any automatic detection for whether light
9696
or dark theme should be used.
9797

9898
It is technically possible for a shell program to detect your terminal's

src/content/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import SvgCommandOutput from '../../components/svg-command-output.astro';
2222
# Features
2323

2424
- Compatible with any `kubectl` version
25-
- Dynamic tty detection to send plaintext when called programatically
25+
- Dynamic tty detection to send plaintext when called programmatically
2626
- Support alias and autocompletion
2727
- Custom color themes
2828

src/content/docs/reference/config.mdx

Lines changed: 79 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,16 @@ theme:
152152
# used when outputs unknown format
153153
fallback: !color # default = $theme.base.success
154154

155+
annotate:
156+
# used for all messages, as "kubectl annotate" always prints "annotated"
157+
annotated: !color # default = $theme.base.success
158+
159+
# used on "(dry run)" and "(server dry run)"
160+
dryRun: !color # default = $theme.apply.dryrun
161+
162+
# used when outputs unknown format
163+
fallback: !color # default = $theme.base.warning
164+
155165
create:
156166
# used on "deployment.apps/foo created"
157167
created: !color # default = $theme.base.success
@@ -176,6 +186,16 @@ theme:
176186
# used on keys. The multiple colors are cycled based on indentation.
177187
key: !color-list # default = $theme.base.key
178188

189+
diff:
190+
# used on added lines
191+
added: !color # default = $theme.base.success
192+
193+
# used on removed lines
194+
removed: !color # default = $theme.base.danger
195+
196+
# used on unchanged lines
197+
unchanged: !color # default = $theme.base.muted
198+
179199
drain:
180200
# used on "node/my-worker-node-01 cordoned"
181201
cordoned: !color # default = $theme.base.primary
@@ -212,6 +232,65 @@ theme:
212232
# used when outputs unknown format
213233
fallback: !color # default = $theme.base.primary
214234

235+
help:
236+
# e.g "Examples:" or "Options:"
237+
header: !color # default = $theme.table.header
238+
239+
# e.g "--kubeconfig"
240+
flag: !color # default = $theme.base.secondary
241+
242+
# Flag descripion under "Options:" heading
243+
flagDesc: !color # default = $theme.base.info
244+
245+
# e.g `[https://example.com]`
246+
url: !color # default = $theme.base.secondary
247+
248+
# Fallback text color
249+
text: !color # default = $theme.base.info
250+
251+
label:
252+
# used when label was added
253+
labeled: !color # default = $theme.base.success
254+
255+
# used when label was removed
256+
unlabeled: !color # default = $theme.base.warning
257+
258+
# used when label was already set
259+
notLabeled: !color # default = $theme.base.muted
260+
261+
# used on "(dry run)" and "(server dry run)"
262+
dryRun: !color # default = $theme.apply.dryrun
263+
264+
# used when outputs unknown format
265+
fallback: !color # default = $theme.base.warning
266+
267+
logs:
268+
key: !color-list # default = $theme.data.key
269+
270+
# Used on quoted strings that are not part of a `key="value"`
271+
quotedString: !color # default = $theme.data.string
272+
273+
date: !color # default = $theme.base.muted
274+
275+
sourceRef: !color # default = $theme.base.muted
276+
277+
guid: !color # default = $theme.base.muted
278+
279+
severity:
280+
trace: !color # default = $theme.base.muted
281+
282+
debug: !color # default = $theme.base.muted
283+
284+
info: !color # default = $theme.base.success
285+
286+
warn: !color # default = $theme.base.warning
287+
288+
error: !color # default = $theme.base.danger
289+
290+
fatal: !color # default = $theme.base.danger
291+
292+
panic: !color # default = $theme.base.danger
293+
215294
options:
216295
# e.g "--kubeconfig"
217296
flag: !color # default = $theme.base.secondary
@@ -268,59 +347,6 @@ theme:
268347
version:
269348
# used on the key
270349
key: !color-list # default = $theme.base.key
271-
272-
help:
273-
# e.g "Examples:" or "Options:"
274-
header: !color # default = $theme.table.header
275-
276-
# e.g "--kubeconfig"
277-
flag: !color # default = $theme.base.secondary
278-
279-
# Flag descripion under "Options:" heading
280-
flagDesc: !color # default = $theme.base.info
281-
282-
# e.g `[https://example.com]`
283-
url: !color # default = $theme.base.secondary
284-
285-
# Fallback text color
286-
text: !color # default = $theme.base.info
287-
288-
logs:
289-
key: !color-list # default = $theme.data.key
290-
291-
# Used on quoted strings that are not part of a `key="value"`
292-
quotedString: !color # default = $theme.data.string
293-
294-
date: !color # default = $theme.base.muted
295-
296-
sourceRef: !color # default = $theme.base.muted
297-
298-
guid: !color # default = $theme.base.muted
299-
300-
severity:
301-
trace: !color # default = $theme.base.muted
302-
303-
debug: !color # default = $theme.base.muted
304-
305-
info: !color # default = $theme.base.success
306-
307-
warn: !color # default = $theme.base.warning
308-
309-
error: !color # default = $theme.base.danger
310-
311-
fatal: !color # default = $theme.base.danger
312-
313-
panic: !color # default = $theme.base.danger
314-
315-
diff:
316-
# used on added lines
317-
added: !color # default = $theme.base.success
318-
319-
# used on removed lines
320-
removed: !color # default = $theme.base.danger
321-
322-
# used on unchanged lines
323-
unchanged: !color # default = $theme.base.muted
324350
```
325351
326352
You can also override the path of the config file using the `KUBECOLOR_CONFIG`

src/content/docs/reference/environment-variables.md

Lines changed: 79 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@ export KUBECOLOR_THEME_APPLY_DRYRUN="$KUBECOLOR_THEME_BASE_SECONDARY"
245245
export KUBECOLOR_THEME_APPLY_FALLBACK="$KUBECOLOR_THEME_BASE_SUCCESS"
246246

247247

248+
# (color) used for all messages, as "kubectl annotate" always prints "annotated"
249+
export KUBECOLOR_THEME_ANNOTATE_ANNOTATED="$KUBECOLOR_THEME_BASE_SUCCESS"
250+
251+
# (color) used on "(dry run)" and "(server dry run)"
252+
export KUBECOLOR_THEME_ANNOTATE_DRYRUN="$KUBECOLOR_THEME_APPLY_DRYRUN"
253+
254+
# (color) used when outputs unknown format
255+
export KUBECOLOR_THEME_ANNOTATE_FALLBACK="$KUBECOLOR_THEME_BASE_WARNING"
256+
257+
248258
# (color) used on "deployment.apps/foo created"
249259
export KUBECOLOR_THEME_CREATE_CREATED="$KUBECOLOR_THEME_BASE_SUCCESS"
250260

@@ -269,6 +279,16 @@ export KUBECOLOR_THEME_DELETE_FALLBACK="$KUBECOLOR_THEME_BASE_DANGER"
269279
export KUBECOLOR_THEME_DESCRIBE_KEY="$KUBECOLOR_THEME_BASE_KEY"
270280

271281

282+
# (color) used on added lines
283+
export KUBECOLOR_THEME_DIFF_ADDED="$KUBECOLOR_THEME_BASE_SUCCESS"
284+
285+
# (color) used on removed lines
286+
export KUBECOLOR_THEME_DIFF_REMOVED="$KUBECOLOR_THEME_BASE_DANGER"
287+
288+
# (color) used on unchanged lines
289+
export KUBECOLOR_THEME_DIFF_UNCHANGED="$KUBECOLOR_THEME_BASE_MUTED"
290+
291+
272292
# (color) used on "node/my-worker-node-01 cordoned"
273293
export KUBECOLOR_THEME_DRAIN_CORDONED="$KUBECOLOR_THEME_BASE_PRIMARY"
274294

@@ -305,6 +325,65 @@ export KUBECOLOR_THEME_EXPOSE_DRYRUN="$KUBECOLOR_THEME_APPLY_DRYRUN"
305325
export KUBECOLOR_THEME_EXPOSE_FALLBACK="$KUBECOLOR_THEME_BASE_PRIMARY"
306326

307327

328+
# (color) e.g "Examples:" or "Options:"
329+
export KUBECOLOR_THEME_HELP_HEADER="$KUBECOLOR_THEME_TABLE_HEADER"
330+
331+
# (color) e.g "--kubeconfig"
332+
export KUBECOLOR_THEME_HELP_FLAG="$KUBECOLOR_THEME_BASE_SECONDARY"
333+
334+
# (color) Flag descripion under "Options:" heading
335+
export KUBECOLOR_THEME_HELP_FLAGDESC="$KUBECOLOR_THEME_BASE_INFO"
336+
337+
# (color) e.g `[https://example.com]`
338+
export KUBECOLOR_THEME_HELP_URL="$KUBECOLOR_THEME_BASE_SECONDARY"
339+
340+
# (color) Fallback text color
341+
export KUBECOLOR_THEME_HELP_TEXT="$KUBECOLOR_THEME_BASE_INFO"
342+
343+
344+
# (color) used when label was added
345+
export KUBECOLOR_THEME_LABEL_LABELED="$KUBECOLOR_THEME_BASE_SUCCESS"
346+
347+
# (color) used when label was removed
348+
export KUBECOLOR_THEME_LABEL_UNLABELED="$KUBECOLOR_THEME_BASE_WARNING"
349+
350+
# (color) used when label was already set
351+
export KUBECOLOR_THEME_LABEL_NOTLABELED="$KUBECOLOR_THEME_BASE_MUTED"
352+
353+
# (color) used on "(dry run)" and "(server dry run)"
354+
export KUBECOLOR_THEME_LABEL_DRYRUN="$KUBECOLOR_THEME_APPLY_DRYRUN"
355+
356+
# (color) used when outputs unknown format
357+
export KUBECOLOR_THEME_LABEL_FALLBACK="$KUBECOLOR_THEME_BASE_WARNING"
358+
359+
360+
export KUBECOLOR_THEME_LOGS_KEY="$KUBECOLOR_THEME_DATA_KEY"
361+
362+
# (color) Used on quoted strings that are not part of a `key="value"`
363+
export KUBECOLOR_THEME_LOGS_QUOTEDSTRING="$KUBECOLOR_THEME_DATA_STRING"
364+
365+
export KUBECOLOR_THEME_LOGS_DATE="$KUBECOLOR_THEME_BASE_MUTED"
366+
367+
export KUBECOLOR_THEME_LOGS_SOURCEREF="$KUBECOLOR_THEME_BASE_MUTED"
368+
369+
export KUBECOLOR_THEME_LOGS_GUID="$KUBECOLOR_THEME_BASE_MUTED"
370+
371+
372+
export KUBECOLOR_THEME_LOGS_SEVERITY_TRACE="$KUBECOLOR_THEME_BASE_MUTED"
373+
374+
export KUBECOLOR_THEME_LOGS_SEVERITY_DEBUG="$KUBECOLOR_THEME_BASE_MUTED"
375+
376+
export KUBECOLOR_THEME_LOGS_SEVERITY_INFO="$KUBECOLOR_THEME_BASE_SUCCESS"
377+
378+
export KUBECOLOR_THEME_LOGS_SEVERITY_WARN="$KUBECOLOR_THEME_BASE_WARNING"
379+
380+
export KUBECOLOR_THEME_LOGS_SEVERITY_ERROR="$KUBECOLOR_THEME_BASE_DANGER"
381+
382+
export KUBECOLOR_THEME_LOGS_SEVERITY_FATAL="$KUBECOLOR_THEME_BASE_DANGER"
383+
384+
export KUBECOLOR_THEME_LOGS_SEVERITY_PANIC="$KUBECOLOR_THEME_BASE_DANGER"
385+
386+
308387
# (color) e.g "--kubeconfig"
309388
export KUBECOLOR_THEME_OPTIONS_FLAG="$KUBECOLOR_THEME_BASE_SECONDARY"
310389

@@ -360,59 +439,6 @@ export KUBECOLOR_THEME_UNCORDON_FALLBACK="$KUBECOLOR_THEME_BASE_WARNING"
360439

361440
# (color-list) used on the key
362441
export KUBECOLOR_THEME_VERSION_KEY="$KUBECOLOR_THEME_BASE_KEY"
363-
364-
365-
# (color) e.g "Examples:" or "Options:"
366-
export KUBECOLOR_THEME_HELP_HEADER="$KUBECOLOR_THEME_TABLE_HEADER"
367-
368-
# (color) e.g "--kubeconfig"
369-
export KUBECOLOR_THEME_HELP_FLAG="$KUBECOLOR_THEME_BASE_SECONDARY"
370-
371-
# (color) Flag descripion under "Options:" heading
372-
export KUBECOLOR_THEME_HELP_FLAGDESC="$KUBECOLOR_THEME_BASE_INFO"
373-
374-
# (color) e.g `[https://example.com]`
375-
export KUBECOLOR_THEME_HELP_URL="$KUBECOLOR_THEME_BASE_SECONDARY"
376-
377-
# (color) Fallback text color
378-
export KUBECOLOR_THEME_HELP_TEXT="$KUBECOLOR_THEME_BASE_INFO"
379-
380-
381-
export KUBECOLOR_THEME_LOGS_KEY="$KUBECOLOR_THEME_DATA_KEY"
382-
383-
# (color) Used on quoted strings that are not part of a `key="value"`
384-
export KUBECOLOR_THEME_LOGS_QUOTEDSTRING="$KUBECOLOR_THEME_DATA_STRING"
385-
386-
export KUBECOLOR_THEME_LOGS_DATE="$KUBECOLOR_THEME_BASE_MUTED"
387-
388-
export KUBECOLOR_THEME_LOGS_SOURCEREF="$KUBECOLOR_THEME_BASE_MUTED"
389-
390-
export KUBECOLOR_THEME_LOGS_GUID="$KUBECOLOR_THEME_BASE_MUTED"
391-
392-
393-
export KUBECOLOR_THEME_LOGS_SEVERITY_TRACE="$KUBECOLOR_THEME_BASE_MUTED"
394-
395-
export KUBECOLOR_THEME_LOGS_SEVERITY_DEBUG="$KUBECOLOR_THEME_BASE_MUTED"
396-
397-
export KUBECOLOR_THEME_LOGS_SEVERITY_INFO="$KUBECOLOR_THEME_BASE_SUCCESS"
398-
399-
export KUBECOLOR_THEME_LOGS_SEVERITY_WARN="$KUBECOLOR_THEME_BASE_WARNING"
400-
401-
export KUBECOLOR_THEME_LOGS_SEVERITY_ERROR="$KUBECOLOR_THEME_BASE_DANGER"
402-
403-
export KUBECOLOR_THEME_LOGS_SEVERITY_FATAL="$KUBECOLOR_THEME_BASE_DANGER"
404-
405-
export KUBECOLOR_THEME_LOGS_SEVERITY_PANIC="$KUBECOLOR_THEME_BASE_DANGER"
406-
407-
408-
# (color) used on added lines
409-
export KUBECOLOR_THEME_DIFF_ADDED="$KUBECOLOR_THEME_BASE_SUCCESS"
410-
411-
# (color) used on removed lines
412-
export KUBECOLOR_THEME_DIFF_REMOVED="$KUBECOLOR_THEME_BASE_DANGER"
413-
414-
# (color) used on unchanged lines
415-
export KUBECOLOR_THEME_DIFF_UNCHANGED="$KUBECOLOR_THEME_BASE_MUTED"
416442
```
417443

418444
## Deprecated flags

src/content/docs/reference/flags.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ As an example, if you run:
1313
kubecolor get pods --force-colors --namespace=kube-system
1414
```
1515

16-
Then kubecolor will translate that to the following kubectl invokation:
16+
Then kubecolor will translate that to the following kubectl invocation:
1717

1818
```bash
1919
kubectl get pods --namespace=kube-system
2020
```
2121

2222
:::caution
23-
Due to techinical limitations the kubecolor command-line flag values must be
23+
Due to technical limitations the kubecolor command-line flag values must be
2424
specified in the same string as `--flag=value`.
2525

2626
```bash

0 commit comments

Comments
 (0)