bash: remove sealed secrets scripts

This commit is contained in:
Michael Grote 2024-06-05 19:06:48 +02:00
parent 49d07f1ab4
commit 5927a331a0
3 changed files with 0 additions and 34 deletions

View file

@ -1,18 +0,0 @@
#!/bin/bash
tmpfile=$(mktemp)
cat << EOF
kind: Secret
apiVersion: v1
metadata:
name: NAME_DES_SECRETS
namespace: drone
stringData:
ICH_BIN_DER VARIABLEN_NAME: ICH_BIN_DAS_PASSWORT
EOF > $tmpfile
vim $tmpfile
cat $tmpfile | kubeseal --controller-namespace kube-system --format yaml > ./sealed-secret.yaml
cat sealed-secret.yaml
rm $tmpfile ./sealed-secret.yaml

View file

@ -1,8 +0,0 @@
#!/bin/bash
if [[ "$#" -eq 2 ]]; then
kubectl get secret $1 -n $2 -o jsonpath="{.data.<key>}" | base64 --decode ; echo""
else
echo "Missing:
\$1 = secretname
\$2 = namespace"
fi

View file

@ -1,8 +0,0 @@
#!/bin/bash
echo ">>> write key to ./main.key"
kubectl get secret -n kube-system -l sealedsecrets.bitnami.com/sealed-secrets-key -o yaml > main.key
# https://github.com/bitnami-labs/sealed-secrets#how-can-i-do-a-backup-of-my-sealedsecrets
# restore with:
# kubectl apply -f main.key
# kubectl delete pod -n kube-system -l name=sealed-secrets-controller