dotfiles/scripts/sealed_secrets_create_encrypted_secret.sh
Michael Grote 947024fcf1 chmod +x
Signed-off-by: Michael Grote <michael.grote@posteo.de>
2024-01-25 10:14:22 +01:00

18 lines
369 B
Bash
Executable file

#!/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