Skip to content

Commit

Permalink
add shed-contexts, close #19
Browse files Browse the repository at this point in the history
  • Loading branch information
siakhooi committed Dec 24, 2023
1 parent c804a6a commit 5ca2c3f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
| package | commands | version |
| ----------------------------- | ----------------------------------------------- | ---------- |
| bash | bash | |
| coreutils | echo printenv sort expand cp cat mkdir touch ls | |
| coreutils | echo printenv sort expand cp cat mkdir touch ls nl | |
| vim | vi | |
| grep | grep | |
| findutils | find | |
| man-db | man | |
| sed | sed | |
| git | git | |
| siakhooi-devutils-echo-colors | echo.green echo.yellow | `>= 1.0.0` |
| siakhooi-textutils | is-true is-false | `>= 1.3.0` |
| siakhooi-textutils | is-true is-false make-table | `>= 1.7.0` |
| bash-completion | | |

## External dependencies
Expand All @@ -22,3 +22,4 @@
| kubectl | kubectl |
| helm | helm |
| istioctl | istioctl |
| jq | jq |
1 change: 1 addition & 0 deletions Features-Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This is the list of features added by release. Bug fixing are excluded.

| release | bin | completions | man | config.yaml |
| ------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `1.11.0`| shed-contexts | | | |
| `1.10.0`| | | | .sheds[].kubeconfig[].prompt-name |
| `1.9.0` | | | shed-kube-resources |
| `1.8.0` | shed-kubectl-apply, ka<br>shed-kubectl-delete, kd<br>shed-kubectl-resources | shed-kubectl-apply, ka<br>shed-kubectl-delete, kd |
Expand Down
1 change: 1 addition & 0 deletions docs/shed.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ shed is a program that provides alternate way to run shed programs.
| `shed` | `shed help`, `man shed` | | (This doc) |
| `shed-use` shedCode | | | [📚 Doc](shed-use.md) |
| `shed-kubeconfig-use` kubeconfig-number | | `c0`, `c1`, `c2`, `c3`, `c4` | [📚 Doc](shed-kubeconfig-use.md) |
| `shed-contexts` | `shed contexts` | ||
| `shed-kubectl-resources` | `shed kubectl-resources` | | [📚 Doc](shed-kubectl-resources.md) |
| `shed-kubectl-apply` | `shed kubectl-apply` | `ka` ||
| `shed-kubectl-delete` | `shed kubectl-delete` | `kd` ||
4 changes: 2 additions & 2 deletions src/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: siakhooi-shed
Version: 1.10.2
Version: 1.11.0
Maintainer: Siak Hooi <siakhooi@gmail.com>
Depends: bash, coreutils, findutils, grep, vim, man-db, sed, siakhooi-devutils-echo-colors (>= 1.0.0), git, siakhooi-textutils (>= 1.3.0), bash-completion
Depends: bash, coreutils, findutils, grep, vim, man-db, sed, siakhooi-devutils-echo-colors (>= 1.0.0), git, siakhooi-textutils (>= 1.7.0), bash-completion, jq
Architecture: amd64
Homepage: <https://github.com/siakhooi/shed>
Description: Programs to manage kubernetes environments
4 changes: 4 additions & 0 deletions src/bin/shed
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ values)
shed-values "$@"
exit $?
;;
contexts)
shed-contexts "$@"
exit $?
;;
kubectl)
shed-kubectl "$@"
exit $?
Expand Down
5 changes: 5 additions & 0 deletions src/bin/shed-contexts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

columnHeaders='Context,Name,Kube Context,Namespace'

shed-values | yq -py -oj | jq -r '.kubeconfig[]|[."prompt-name", .context, .namespace]|join(",")' | nl -s, -w1 -v0 | prefix 'c' | make-table "$columnHeaders"

0 comments on commit 5ca2c3f

Please sign in to comment.