Last active
April 11, 2021 02:33
-
-
Save echang0929/91d784623079ccc57a75935d5912bf18 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install cryptography | |
AFLOW_PASSWD="password" | |
AFLOW_FERNET=$(python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())") | |
PGRES_PASSWD="postgresql" | |
PGRES_PGPASS="postgresql" | |
REDIS_PASSWD="redis" | |
cat <<EOF | kubectl apply -f - | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: aflow-secrets | |
type: Opaque | |
data: | |
airflow-password: $(echo -n ${AFLOW_PASSWD} | base64) | |
airflow-fernetKey: $(echo -n ${AFLOW_FERNET} | base64) | |
postgresql-password: $(echo -n ${PGRES_PASSWD} | base64) | |
postgresql-postgres-password: $(echo -n ${PGRES_PGPASS} | base64) | |
redis-password: $(echo -n $REDIS_PASSWD | base64) | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment