Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tomklapiscak committed Apr 25, 2024
1 parent a006e43 commit 3c7bc10
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,35 +124,35 @@ spec:
data:
docdb_username: "{{ docdb_instance_username | b64encode }}"
docdb_password: "{{ docdb_instance_password | b64encode }}" #}
DOCDB_INSTANCE_USERNAME="masinst_${MAS_INSTANCE_ID}"
DOCDB_INSTANCE_PASSWORD=${DOCDB_INSTANCE_PASSWORD:-`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 20`}
# DOCDB_INSTANCE_USERNAME="masinst_${MAS_INSTANCE_ID}"
# DOCDB_INSTANCE_PASSWORD=${DOCDB_INSTANCE_PASSWORD:-`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 20`}
echo
echo "================================================================================"
echo "Updating $SECRET_NAME_MONGO"
echo "================================================================================"
{# echo "DOCDB_MASTER_INFO=${DOCDB_MASTER_INFO}"
echo "DOCDB_INSTANCE_USERNAME=${DOCDB_INSTANCE_USERNAME:0:2}<snip>"
echo "DOCDB_INSTANCE_PASSWORD=${DOCDB_INSTANCE_PASSWORD:0:2}<snip>"
echo "SM_AWS_REGION=${SM_AWS_REGION}"
echo "SM_AWS_ACCESS_KEY_ID=${SM_AWS_ACCESS_KEY_ID:0:2}<snip>"
echo "SM_AWS_SECRET_ACCESS_KEY=${SM_AWS_SECRET_ACCESS_KEY:0:2}<snip>"
echo "SECRET_NAME_MONGO=${SECRET_NAME_MONGO}"
echo
echo "DOCDB_MASTER_INFO_ESCAPED:"
echo "${DOCDB_MASTER_INFO_ESCAPED}"
# echo "DOCDB_MASTER_INFO=${DOCDB_MASTER_INFO}"
# echo "DOCDB_INSTANCE_USERNAME=${DOCDB_INSTANCE_USERNAME:0:2}<snip>"
# echo "DOCDB_INSTANCE_PASSWORD=${DOCDB_INSTANCE_PASSWORD:0:2}<snip>"
# echo "SM_AWS_REGION=${SM_AWS_REGION}"
# echo "SM_AWS_ACCESS_KEY_ID=${SM_AWS_ACCESS_KEY_ID:0:2}<snip>"
# echo "SM_AWS_SECRET_ACCESS_KEY=${SM_AWS_SECRET_ACCESS_KEY:0:2}<snip>"
# echo "SECRET_NAME_MONGO=${SECRET_NAME_MONGO}"
# echo
# echo "DOCDB_MASTER_INFO_ESCAPED:"
# echo "${DOCDB_MASTER_INFO_ESCAPED}"
DOCDB_MASTER_INFO_ESCAPED=${DOCDB_MASTER_INFO//\"/\\\"}
DOCDB_MASTER_INFO_ESCAPED=${DOCDB_MASTER_INFO_ESCAPED//$'\n'/\\n}
SECRETS_KEY_SEPERATOR="/"
export SECRET_NAME_MONGO=${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}${MAS_INSTANCE_ID}${SECRETS_KEY_SEPERATOR}mongo #}
# DOCDB_MASTER_INFO_ESCAPED=${DOCDB_MASTER_INFO//\"/\\\"}
# DOCDB_MASTER_INFO_ESCAPED=${DOCDB_MASTER_INFO_ESCAPED//$'\n'/\\n}
# SECRETS_KEY_SEPERATOR="/"
# export SECRET_NAME_MONGO=${ACCOUNT_ID}${SECRETS_KEY_SEPERATOR}${CLUSTER_ID}${SECRETS_KEY_SEPERATOR}${MAS_INSTANCE_ID}${SECRETS_KEY_SEPERATOR}mongo
{# source /mascli/functions/gitops_utils
sm_login
sm_update_secret $SECRET_NAME_MONGO "{\"info\":\"$DOCDB_MASTER_INFO_ESCAPED\", \"username\":\"$DOCDB_INSTANCE_USERNAME\", \"password\":\"$DOCDB_INSTANCE_PASSWORD\"}" #}
# source /mascli/functions/gitops_utils
# sm_login
# sm_update_secret $SECRET_NAME_MONGO "{\"info\":\"$DOCDB_MASTER_INFO_ESCAPED\", \"username\":\"$DOCDB_INSTANCE_USERNAME\", \"password\":\"$DOCDB_INSTANCE_PASSWORD\"}"
restartPolicy: Never
serviceAccountName: sync-sa
Expand Down

0 comments on commit 3c7bc10

Please sign in to comment.