Skip to content

Commit

Permalink
add man page - shed-kubectl-delete
Browse files Browse the repository at this point in the history
  • Loading branch information
siakhooi committed Apr 21, 2024
1 parent 290e87b commit 6ae2d73
Show file tree
Hide file tree
Showing 18 changed files with 113 additions and 14 deletions.
2 changes: 2 additions & 0 deletions Features-Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This is the list of features added by release. Bug fixing are excluded.

| release | bin | completions | man | config.yaml |
| ------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `1.22.0`| | | shed-kubectl-delete |
| `1.21.0`| | | shed-kubectl-apply |
| `1.20.0`| | | shed-contexts |
| `1.19.0`| | | shed-kubectl-logs-previous |
| `1.18.0`| shed-kubectl-logs-previous, k-logs-p | |
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
| `shed` | | bin || [📚 Doc](shed.md) |
| `shed-kubectl-resources` | | bin || [📚 Doc](shed-kubectl-resources.md) |
| `shed-kubectl-apply` | `ka` | bin |||
| `shed-kubectl-delete` | `kd` | bin | ||
| `shed-kubectl-delete` | `kd` | bin | ||
| `shed-version` | | bin |||
| `shed-kubectl-secret-decode` | `k-secret-decode` | bin |||

Expand Down
4 changes: 2 additions & 2 deletions release.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

RELEASE_VERSION=1.21.1
RELEASE_TITLE='fix man page bug - shed-contexts, shed'
RELEASE_VERSION=1.22.0
RELEASE_TITLE='add man page - shed-kubectl-delete'

REGISTRY_USERNAME_DOCKER=siakhooi
2 changes: 1 addition & 1 deletion src/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: siakhooi-shed
Version: 1.21.1
Version: 1.22.0
Maintainer: Siak Hooi <[email protected]>
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
Expand Down
2 changes: 1 addition & 1 deletion src/lib/shed-init
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

export SHED_VERSION=1.21.1
export SHED_VERSION=1.22.0
export SHED_CONFIG_HOME="${SHED_CONFIG_HOME:-$HOME/.shed}"
export SHED_CONFIG_FILE=${SHED_CONFIG_HOME}/config.yaml
export SHED_CONFIG_DIRECTORY_RESOURCES=$SHED_CONFIG_HOME/kubectl-resources
Expand Down
2 changes: 2 additions & 0 deletions src/md/shed-aliases.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ List aliases used by shed programs.
\ \ \ \ alias h='shed-helm'\
\ \ \ \ alias i='shed-istioctl'\
\ \ \ \ alias k='shed-kubectl'\
\ \ \ \ alias ka='shed-kubectl-apply'\
\ \ \ \ alias kd='shed-kubectl-delete'\
\ \ \ \ alias k-bash='shed-kubectl-exec-bash'\
\ \ \ \ alias k-logs-f='shed-kubectl-logs-follow'\
\ \ \ \ alias k-logs-p='shed-kubectl-logs-previous'\
Expand Down
2 changes: 1 addition & 1 deletion src/md/shed-kubectl-apply.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ MIT
Report bugs at https://github.com/siakhooi/shed/issues.

# SEE ALSO
shed-kubectl-resources(1)
shed-kubectl-resources(1),shed-kubectl-delete(1)
39 changes: 39 additions & 0 deletions src/md/shed-kubectl-delete.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
% SHED-KUBECTL-DELETE(1) Siak Hooi DevUtils 1.1.0 | Shed Commands
% Siak Hooi
% April 2024

# NAME
shed-kubectl-delete - delete the resources based on resource located in directory set in \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ environment variable SHED_CONFIG_DIRECTORY_RESOURCES.\
kd - alias to shed-kubectl-delete

# SYNOPSIS
**shed-kubectl-delete** kubectl-resource\
**shed kubectl-delete** kubectl-resource\
**kd** kubectl-resource

# DESCRIPTION
Delete the resources based on resource located in directory set in environment variable\
SHED_CONFIG_DIRECTORY_RESOURCES.

# EXAMPLES
**shed-kubectl-delete** hello-world\
\ \ \ \ + kubectl --context kube-dev-1 delete -f /home/user1/.shed/kubectl-resources/hello-world\
\ \ \ \ pod/hello-world deleted

# FILES
~/.shed/kubectl-resources
: directory contains the resources

# ENVIRONMENT VARIABLES
SHED_CONFIG_DIRECTORY_RESOURCES
: kubectl resources for **shed-kubectl-delete** and **shed-kubectl-delete**.

# LICENSE
MIT

# BUGS
Report bugs at https://github.com/siakhooi/shed/issues.

# SEE ALSO
shed-kubectl-resources(1),shed-kubectl-apply(1)
2 changes: 1 addition & 1 deletion src/md/shed-kubectl-resources.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ MIT
Report bugs at https://github.com/siakhooi/shed/issues.

# SEE ALSO
shed-kubectl(1), shed-kubectl-apply(1)
shed-kubectl(1), shed-kubectl-apply(1), shed-kubectl-delete(1)
4 changes: 3 additions & 1 deletion src/md/shed-kubectl.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ MIT
Report bugs at https://github.com/siakhooi/shed/issues.

# SEE ALSO
shed-use(1), shed-kubeconfig-use(1), shed-helm(1), shed-istioctl(1), shed-kubectl-exec-sh(1), shed-kubectl-exec-bash(1), shed-kubectl-scale(1), shed-kubectl-resources(1)
shed-use(1), shed-kubeconfig-use(1), shed-helm(1), shed-istioctl(1)\
shed-kubectl-exec-sh(1), shed-kubectl-exec-bash(1)\
shed-kubectl-scale(1), shed-kubectl-resources(1), shed-kubectl-apply(1), shed-kubectl-delete(1)
5 changes: 4 additions & 1 deletion src/md/shed.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ shed is a collection of several bash scripts to manage Kubernetes clusters.
**shed config-get** yamlPath\
**shed contexts**\
**shed kubectl-apply** kubectl-resource\
**shed kubectl-delete** kubectl-resource\
**shed help**\
**shed value** yamlPath\
**shed value-key-list**\
Expand All @@ -36,6 +37,7 @@ shed is a collection of several bash scripts to manage Kubernetes clusters.
**shed-config-get** yamlPath\
**shed-contexts**\
**shed-kubectl-apply** kubectl-resource\
**shed-kubectl-delete** kubectl-resource\
**shed-value** yamlPath\
**shed-value-key-list**\
**shed-values**\
Expand All @@ -61,6 +63,7 @@ shed is a collection of several bash scripts to manage Kubernetes clusters.
**h** [helm arguments]\
**i** [istioctl arguments]\
**ka** kubectl-resource\
**ka** kubectl-delete\
**k-sh** (pod \| type/name) [container]\
**k-bash** (pod \| type/name) [container]\
**k-scale** replicas resourceName\
Expand Down Expand Up @@ -131,4 +134,4 @@ shed-value(1), shed-values(1), shed-value-key-list(1)\
shed-use(1), shed-kubeconfig-use(1), shed-kubectl(1), shed-helm(1), shed-isioctl(1)\
shed-kubectl-exec-sh(1),shed-kubectl-exec-bash(1),shed-kubectl-scale(1)\
shed-kubectl-logs-follow(1),shed-kubectl-logs-previous(1)\
shed-kubectl-apply(1)
shed-kubectl-resources(1),shed-kubectl-apply(1),shed-kubectl-delete(1)
2 changes: 2 additions & 0 deletions tests/bats-test-scripts/man/man-1-shed-aliases.expected
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ EXAMPLES
alias h=`shed-helm'
alias i=`shed-istioctl'
alias k=`shed-kubectl'
alias ka=`shed-kubectl-apply'
alias kd=`shed-kubectl-delete'
alias k-bash=`shed-kubectl-exec-bash'
alias k-logs-f=`shed-kubectl-logs-follow'
alias k-logs-p=`shed-kubectl-logs-previous'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BUGS
Report bugs at https://github.com/siakhooi/shed/issues.

SEE ALSO
shed-kubectl-resources(1)
shed-kubectl-resources(1),shed-kubectl-delete(1)

AUTHORS
Siak Hooi.
Expand Down
42 changes: 42 additions & 0 deletions tests/bats-test-scripts/man/man-1-shed-kubectl-delete.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
SHED-KUBECTL-DELETE(1) Shed Commands SHED-KUBECTL-DELETE(1)

NAME
shed-kubectl-delete - delete the resources based on resource located in directory set in
environment variable SHED_CONFIG_DIRECTORY_RESOURCES.
kd - alias to shed-kubectl-delete

SYNOPSIS
shed-kubectl-delete kubectl-resource
shed kubectl-delete kubectl-resource
kd kubectl-resource

DESCRIPTION
Delete the resources based on resource located in directory set in environment variable
SHED_CONFIG_DIRECTORY_RESOURCES.

EXAMPLES
shed-kubectl-delete hello-world
+ kubectl -context kube-dev-1 delete -f /home/user1/.shed/kubectl-resources/hello-world
pod/hello-world deleted

FILES
~/.shed/kubectl-resources
directory contains the resources

ENVIRONMENT VARIABLES
SHED_CONFIG_DIRECTORY_RESOURCES
kubectl resources for shed-kubectl-delete and shed-kubectl-delete.

LICENSE
MIT

BUGS
Report bugs at https://github.com/siakhooi/shed/issues.

SEE ALSO
shed-kubectl-resources(1),shed-kubectl-apply(1)

AUTHORS
Siak Hooi.

Siak Hooi DevUtils 1.1.0 April 2024 SHED-KUBECTL-DELETE(1)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ BUGS
Report bugs at https://github.com/siakhooi/shed/issues.

SEE ALSO
shed-kubectl(1), shed-kubectl-apply(1)
shed-kubectl(1), shed-kubectl-apply(1), shed-kubectl-delete(1)

AUTHORS
Siak Hooi.
Expand Down
5 changes: 3 additions & 2 deletions tests/bats-test-scripts/man/man-1-shed-kubectl.expected
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ BUGS
Report bugs at https://github.com/siakhooi/shed/issues.

SEE ALSO
shed-use(1), shed-kubeconfig-use(1), shed-helm(1), shed-istioctl(1), shed-kubectl-exec-sh(1), shed-kubectl-ex-
ec-bash(1), shed-kubectl-scale(1), shed-kubectl-resources(1)
shed-use(1), shed-kubeconfig-use(1), shed-helm(1), shed-istioctl(1)
shed-kubectl-exec-sh(1), shed-kubectl-exec-bash(1)
shed-kubectl-scale(1), shed-kubectl-resources(1), shed-kubectl-apply(1), shed-kubectl-delete(1)

AUTHORS
Siak Hooi.
Expand Down
5 changes: 4 additions & 1 deletion tests/bats-test-scripts/man/man-1-shed.expected
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SYNOPSIS
shed config-get yamlPath
shed contexts
shed kubectl-apply kubectl-resource
shed kubectl-delete kubectl-resource
shed help
shed value yamlPath
shed value-key-list
Expand All @@ -34,6 +35,7 @@ SYNOPSIS
shed-config-get yamlPath
shed-contexts
shed-kubectl-apply kubectl-resource
shed-kubectl-delete kubectl-resource
shed-value yamlPath
shed-value-key-list
shed-values
Expand All @@ -59,6 +61,7 @@ SYNOPSIS
h [helm arguments]
i [istioctl arguments]
ka kubectl-resource
ka kubectl-delete
k-sh (pod | type/name) [container]
k-bash (pod | type/name) [container]
k-scale replicas resourceName
Expand Down Expand Up @@ -125,7 +128,7 @@ SEE ALSO
shed-use(1), shed-kubeconfig-use(1), shed-kubectl(1), shed-helm(1), shed-isioctl(1)
shed-kubectl-exec-sh(1),shed-kubectl-exec-bash(1),shed-kubectl-scale(1)
shed-kubectl-logs-follow(1),shed-kubectl-logs-previous(1)
shed-kubectl-apply(1)
shed-kubectl-resources(1),shed-kubectl-apply(1),shed-kubectl-delete(1)

AUTHORS
Siak Hooi.
Expand Down
3 changes: 3 additions & 0 deletions tests/bats-test-scripts/man/man.bats
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ run-man-test(){
@test "man shed-kubectl-apply" {
run-man-test 1 shed-kubectl-apply
}
@test "man shed-kubectl-delete" {
run-man-test 1 shed-kubectl-delete
}
@test "man shed-kubectl" {
run-man-test 1 shed-kubectl
}
Expand Down

0 comments on commit 6ae2d73

Please sign in to comment.