This commit is contained in:
Mariano Z. 2025-04-21 12:07:24 -03:00
commit 6d87ac8ba1
Signed by: marianozunino
GPG key ID: 4C73BAD25156DACE
139 changed files with 7604 additions and 0 deletions

25
local-bin/.local/bin/rmq-passwd Executable file
View 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