diff --git a/bin/v2/postgres-setup.sh b/bin/v2/postgres-setup.sh index 7f04a13bbeb..248237d0fc4 100644 --- a/bin/v2/postgres-setup.sh +++ b/bin/v2/postgres-setup.sh @@ -19,11 +19,11 @@ if [ -z "${NAMESPACE_NAME}" ] || [ -z "${APP_NAME}" ]; then exit 1 fi -if [ ! -f "apps/$NAMESPACE_NAME/preview/aso" ]; then +if [ ! -f "apps/$NAMESPACE_NAME/dev/aso" ]; then echo "Creating aso" mkdir -p apps/$NAMESPACE_NAME - mkdir -p apps/$NAMESPACE_NAME/preview - mkdir -p apps/$NAMESPACE_NAME/preview/aso + mkdir -p apps/$NAMESPACE_NAME/dev + mkdir -p apps/$NAMESPACE_NAME/dev/aso ( cat <"apps/$NAMESPACE_NAME/preview/aso/$NAMESPACE_NAME-postgres-config.yaml" + ) >"apps/$NAMESPACE_NAME/dev/aso/$NAMESPACE_NAME-postgres-config.yaml" ( cat <"apps/$NAMESPACE_NAME/preview/aso/$NAMESPACE_NAME-postgres.yaml" + ) >"apps/$NAMESPACE_NAME/dev/aso/$NAMESPACE_NAME-postgres.yaml" fi -if [ ! -f "apps/$NAMESPACE_NAME/preview/sops-secrets" ]; then +if [ ! -f "apps/$NAMESPACE_NAME/dev/sops-secrets" ]; then echo "Creating sops-secrets" mkdir -p apps/$NAMESPACE_NAME - mkdir -p apps/$NAMESPACE_NAME/preview - mkdir -p apps/$NAMESPACE_NAME/preview/sops-secrets + mkdir -p apps/$NAMESPACE_NAME/dev + mkdir -p apps/$NAMESPACE_NAME/dev/sops-secrets fi ( @@ -80,7 +75,7 @@ metadata: namespace: $NAMESPACE_NAME type: Opaque EOF -) >"apps/$NAMESPACE_NAME/preview/sops-secrets/$APP_NAME-values.enc.yaml" +) >"apps/$NAMESPACE_NAME/dev/sops-secrets/$APP_NAME-values.enc.yaml" if ! [ -f /usr/local/bin/sops ]; then echo "Sops is not installed... installing..." @@ -89,7 +84,7 @@ if ! [ -f /usr/local/bin/sops ]; then chmod +x /usr/local/bin/sops fi -sops --encrypt --azure-kv https://dcdcftappsdevkv.vault.azure.net/keys/sops-key/aedb9ea38954430ca1d0a46ed589c049 --encrypted-regex "^(data|stringData)$" --in-place apps/$NAMESPACE_NAME/preview/sops-secrets/$APP_NAME-values.enc.yaml +sops --encrypt --azure-kv https://dtssharedservicesdevkv.vault.azure.net/keys/sops-key/2beba064ddfe454482ad0133af2cf0fd --encrypted-regex "^(data|stringData)$" --in-place apps/$NAMESPACE_NAME/dev/sops-secrets/$APP_NAME-values.enc.yaml ( cat <"apps/$NAMESPACE_NAME/preview/sops-secrets/kustomization.yaml" +) >"apps/$NAMESPACE_NAME/dev/sops-secrets/kustomization.yaml"