From 3c7bc1054489afcc4d82f6809ae8e8f9a033f69f Mon Sep 17 00:00:00 2001 From: Tom Klapiscak <7372253+tomklapiscak@users.noreply.github.com> Date: Thu, 25 Apr 2024 13:21:14 +0100 Subject: [PATCH] fix --- .../templates/00-aws-docdb-add-user_Job.yaml | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/applications/91-ibm-sync-jobs/templates/00-aws-docdb-add-user_Job.yaml b/applications/91-ibm-sync-jobs/templates/00-aws-docdb-add-user_Job.yaml index f8a7dfe15..21f60d635 100644 --- a/applications/91-ibm-sync-jobs/templates/00-aws-docdb-add-user_Job.yaml +++ b/applications/91-ibm-sync-jobs/templates/00-aws-docdb-add-user_Job.yaml @@ -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}" - echo "DOCDB_INSTANCE_PASSWORD=${DOCDB_INSTANCE_PASSWORD:0:2}" - echo "SM_AWS_REGION=${SM_AWS_REGION}" - echo "SM_AWS_ACCESS_KEY_ID=${SM_AWS_ACCESS_KEY_ID:0:2}" - echo "SM_AWS_SECRET_ACCESS_KEY=${SM_AWS_SECRET_ACCESS_KEY:0:2}" - 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}" + # echo "DOCDB_INSTANCE_PASSWORD=${DOCDB_INSTANCE_PASSWORD:0:2}" + # echo "SM_AWS_REGION=${SM_AWS_REGION}" + # echo "SM_AWS_ACCESS_KEY_ID=${SM_AWS_ACCESS_KEY_ID:0:2}" + # echo "SM_AWS_SECRET_ACCESS_KEY=${SM_AWS_SECRET_ACCESS_KEY:0:2}" + # 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