init
This commit is contained in:
commit
6d87ac8ba1
139 changed files with 7604 additions and 0 deletions
25
local-bin/.local/bin/rmq-passwd
Executable file
25
local-bin/.local/bin/rmq-passwd
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
PREFIX="oc-"
|
||||
SUFFIX="-eks-cluster"
|
||||
FINAL=""
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
context="$PREFIX$1$SUFFIX"
|
||||
current_context=$(kubectl config current-context)
|
||||
|
||||
kubectl config use-context $context >/dev/null
|
||||
kubectl config set-context --current --namespace=oc-app >/dev/null
|
||||
|
||||
# is second argument provided then silent exit
|
||||
password=$(kubectl get secret oc-secrets -o jsonpath="{.data.rabbit_passwd}" | base64 --decode)
|
||||
|
||||
printf "$password" | wl-copy
|
||||
# printf "$password" | xsel --clipboard
|
||||
|
||||
# reset context
|
||||
kubectl config use-context $current_context >/dev/null
|
||||
kubectl config set-context --current --namespace=oc-app >/dev/null
|
Loading…
Add table
Add a link
Reference in a new issue