dotfiles/scripts/sealed_secrets_create_encrypted_secret.sh

19 lines
369 B
Bash
Raw Normal View History

2024-01-25 09:53:09 +01:00
#!/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