Skip to content

Commit

Permalink
update reana secrets script
Browse files Browse the repository at this point in the history
  • Loading branch information
garciagenrique committed Nov 19, 2024
1 parent 8e9034d commit 75b277b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions infrastructure/scripts/reana_secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ SECRETS_DIR="/root/software/vre/infrastructure/secrets/reana"
RAW_SECRETS_TMP_DIR="/root/software/vre/infrastructure/secrets/tmp_local_secrets"


# echo "Create REANA DB secret"
echo "Create REANA DB secret"

# DB_OUTPUT_SECRET="reana-db.yaml"
# RAW_DB_FILE_SECRET=${RAW_SECRETS_TMP_DIR}/${DB_OUTPUT_SECRET}
DB_OUTPUT_SECRET="reana-db.yaml"
RAW_DB_FILE_SECRET=${RAW_SECRETS_TMP_DIR}/${DB_OUTPUT_SECRET}

# cat ${RAW_DB_FILE_SECRET} | kubeseal --controller-name=${CONTROLLER_NAME} --controller-namespace=${CONTROLLER_NS} --format yaml --namespace=${REANA_NS} > ${SECRETS_DIR}/ss_${DB_OUTPUT_SECRET}
# kubectl apply -f ${SECRETS_DIR}/ss_${DB_OUTPUT_SECRET}
cat ${RAW_DB_FILE_SECRET} | kubeseal --controller-name=${CONTROLLER_NAME} --controller-namespace=${CONTROLLER_NS} --format yaml --namespace=${REANA_NS} > ${SECRETS_DIR}/ss_${DB_OUTPUT_SECRET}
kubectl apply -f ${SECRETS_DIR}/ss_${DB_OUTPUT_SECRET}


# echo "Create REANA Admin Access Token secret"
echo "Create REANA Admin Access Token secret"

# ADMIN_ACCOUNT_SECRET='reana-admin-access-token.yaml'
# RAW_ADMIN_FILE_SECRET=${RAW_SECRETS_TMP_DIR}/${ADMIN_ACCOUNT_SECRET}
ADMIN_ACCOUNT_SECRET='reana-admin-access-token.yaml'
RAW_ADMIN_FILE_SECRET=${RAW_SECRETS_TMP_DIR}/${ADMIN_ACCOUNT_SECRET}

# cat ${RAW_ADMIN_FILE_SECRET} | kubeseal --controller-name=${CONTROLLER_NAME} --controller-namespace=${CONTROLLER_NS} --format yaml --namespace=${REANA_NS} > ${SECRETS_DIR}/ss_${ADMIN_ACCOUNT_SECRET}
# kubectl apply -f ${SECRETS_DIR}/ss_${ADMIN_ACCOUNT_SECRET}
cat ${RAW_ADMIN_FILE_SECRET} | kubeseal --controller-name=${CONTROLLER_NAME} --controller-namespace=${CONTROLLER_NS} --format yaml --namespace=${REANA_NS} > ${SECRETS_DIR}/ss_${ADMIN_ACCOUNT_SECRET}
kubectl apply -f ${SECRETS_DIR}/ss_${ADMIN_ACCOUNT_SECRET}


echo "Create REANA IAM client credentials"
Expand All @@ -43,6 +43,8 @@ kubectl apply -f ${SECRETS_DIR}/ss_${REANA_IAM_ACCOUNT_SECRET}

# echo "Create 'REANA secrets' secret"
# # This secret is unknow for what is used - no doc :harold:
# # Kept commented for the moment

# REANA_SECRETS_SECRET='reana-secrets.yaml'
# RAW_REANA_SECRETS_FILE_SECRET=${RAW_SECRETS_TMP_DIR}/${REANA_SECRETS_SECRET}

Expand Down

0 comments on commit 75b277b

Please sign in to comment.