From f6ec000742c0725da1d65cc56dae4530a8a05e26 Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Tue, 22 Mar 2022 10:47:53 -0400 Subject: [PATCH] Remove Caddy from preview envs (#26336) * remove caddy from preview envs * fix: remove location from template Co-authored-by: Peter Bengtsson --- .../actions-scripts/get-preview-app-info.sh | 1 - .../workflows/azure-preview-env-deploy.yml | 3 - azure-preview-env-template.json | 64 ------------------- 3 files changed, 68 deletions(-) diff --git a/.github/actions-scripts/get-preview-app-info.sh b/.github/actions-scripts/get-preview-app-info.sh index f3e00e7456..5c7d3df14e 100755 --- a/.github/actions-scripts/get-preview-app-info.sh +++ b/.github/actions-scripts/get-preview-app-info.sh @@ -13,7 +13,6 @@ [[ -z $APP_NAME_SEED ]] && { echo "Missing APP_NAME_SEED. Exiting."; exit 1; } PREVIEW_ENV_LOCATION="eastus" -echo "PREVIEW_ENV_LOCATION=${PREVIEW_ENV_LOCATION}" >> $GITHUB_ENV REPO_NAME="${GITHUB_REPOSITORY#*\/}" echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV diff --git a/.github/workflows/azure-preview-env-deploy.yml b/.github/workflows/azure-preview-env-deploy.yml index b87f627ba5..f3c838dcdb 100644 --- a/.github/workflows/azure-preview-env-deploy.yml +++ b/.github/workflows/azure-preview-env-deploy.yml @@ -203,13 +203,10 @@ jobs: template: ./azure-preview-env-template.json deploymentName: ${{ env.DEPLOYMENT_NAME }} parameters: appName="${{ env.APP_NAME }}" - location="${{ env.PREVIEW_ENV_LOCATION }}" containerImage="${{ env.DOCKER_IMAGE }}" dockerRegistryUrl="${{ secrets.NONPROD_REGISTRY_SERVER }}" dockerRegistryUsername="${{ secrets.NONPROD_REGISTRY_USERNAME }}" dockerRegistryPassword="${{ secrets.NONPROD_REGISTRY_PASSWORD }}" - storageAccountName="${{ secrets.AZURE_STORAGE_ACCOUNT_NAME }}" - storageAccountKey="${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }}" # this shows warnings in the github actions console, because the flag is passed through a validation run, # but it *is* functional during the actual execution additionalArguments: --no-wait diff --git a/azure-preview-env-template.json b/azure-preview-env-template.json index 82667ab87b..f63f318358 100644 --- a/azure-preview-env-template.json +++ b/azure-preview-env-template.json @@ -11,9 +11,6 @@ "description": "A unique name for the app" } }, - "location": { - "type": "String" - }, "containerImage": { "type": "string", "defaultValue": null, @@ -32,12 +29,6 @@ }, "dockerRegistryPassword": { "type": "SecureString" - }, - "storageAccountName": { - "type": "String" - }, - "storageAccountKey": { - "type": "SecureString" } }, "resources": [ @@ -83,53 +74,6 @@ } } } - }, - { - "name": "caddy-ssl-server", - "properties": { - "image": "caddy:2.4.6", - "command": [ - "caddy", - "reverse-proxy", - "--from", - "[concat(parameters('appName'), '.', parameters('location'), '.azurecontainer.io')]", - "--to", - "localhost:4000" - ], - "ports": [ - { - "protocol": "TCP", - "port": 443 - }, - { - "protocol": "TCP", - "port": 80 - } - ], - "environmentVariables": [], - "resources": { - "requests": { - "memoryInGB": 1, - "cpu": 1 - } - }, - "volumeMounts": [ - { - "name": "caddy-data", - "mountPath": "/data" - } - ] - } - } - ], - "volumes": [ - { - "name": "caddy-data", - "azureFile": { - "shareName": "caddy", - "storageAccountName": "[parameters('storageAccountName')]", - "storageAccountKey": "[parameters('storageAccountKey')]" - } } ], "imageRegistryCredentials": [ @@ -142,17 +86,9 @@ "restartPolicy": "Always", "ipAddress": { "ports": [ - { - "protocol": "TCP", - "port": 443 - }, { "protocol": "TCP", "port": 4000 - }, - { - "protocol": "TCP", - "port": 80 } ], "type": "Public",