diff --git a/bin/v2/postgres-setup.sh b/bin/v2/postgres-setup.sh deleted file mode 100644 index 248237d0fc4..00000000000 --- a/bin/v2/postgres-setup.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env bash -# set -ex - -NAMESPACE='${NAMESPACE}' -ENVIRONMENT='${ENVIRONMENT}' -NAMESPACE_NAME="$1" -APP_NAME="$2" -APPS_DIR="../../apps/" -CLUSTERS_DIR="../../clusters" - -PASSWORD=$(openssl rand -base64 15) - -function usage() { - echo 'usage: ./postgres-setup.sh ' -} - -if [ -z "${NAMESPACE_NAME}" ] || [ -z "${APP_NAME}" ]; then - usage - exit 1 -fi - -if [ ! -f "apps/$NAMESPACE_NAME/dev/aso" ]; then - echo "Creating aso" - mkdir -p apps/$NAMESPACE_NAME - mkdir -p apps/$NAMESPACE_NAME/dev - mkdir -p apps/$NAMESPACE_NAME/dev/aso - - ( - cat <"apps/$NAMESPACE_NAME/dev/aso/$NAMESPACE_NAME-postgres-config.yaml" - - ( - cat <"apps/$NAMESPACE_NAME/dev/aso/$NAMESPACE_NAME-postgres.yaml" -fi - -if [ ! -f "apps/$NAMESPACE_NAME/dev/sops-secrets" ]; then - echo "Creating sops-secrets" - mkdir -p apps/$NAMESPACE_NAME - mkdir -p apps/$NAMESPACE_NAME/dev - mkdir -p apps/$NAMESPACE_NAME/dev/sops-secrets -fi - -( - cat <"apps/$NAMESPACE_NAME/dev/sops-secrets/$APP_NAME-values.enc.yaml" - -if ! [ -f /usr/local/bin/sops ]; then - echo "Sops is not installed... installing..." - curl -LO https://github.com/getsops/sops/releases/download/v3.9.1/sops-v3.9.1.darwin.amd64 - mv sops-v3.9.1.darwin.amd64 /usr/local/bin/sops - chmod +x /usr/local/bin/sops -fi - -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/dev/sops-secrets/kustomization.yaml"