Skip to content

Commit

Permalink
kube refine for backup
Browse files Browse the repository at this point in the history
Define the required information in `$env.KUBERNETES_REFINE`,
`kube refine` will collect information according to its definition

Definitions in `status` and `cluster_status` are runtime information and will not be collected. They are used in the `kg` command to display status

A new module, `refine.nu`, declaratively extracts data from complex structures.

`container-list` additionally displays the cmd field of the image

rename `kcconf` to `kccc` (kubectl change context clone)
  • Loading branch information
nashvi committed Mar 15, 2024
1 parent c2ef662 commit 43b574a
Show file tree
Hide file tree
Showing 3 changed files with 368 additions and 29 deletions.
2 changes: 2 additions & 0 deletions modules/docker/docker.nu
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export def container-list [
let img = ^$cli ...($n | with-flag -n) inspect $image
| from json
| get 0
let imgCmd = $img.Config.Cmd?
let imgEnv = $img.Config.Env?
| reduce -f {} {|i, a|
let x = $i | split row '='
Expand All @@ -71,6 +72,7 @@ export def container-list [
env: $imgEnv
mounts: $m
entrypoint: $r.Path?
cmd: $imgCmd
args: $r.Args
}
}
Expand Down
Loading

0 comments on commit 43b574a

Please sign in to comment.