From 749149e48bc2582cea01cd0a3da93428ca14e413 Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Thu, 10 Feb 2022 16:42:24 -0600 Subject: [PATCH] Add persistent caddy storage (#25242) * add storage account for persistent caddy storage --- .../workflows/azure-preview-env-deploy.yml | 2 ++ azure-preview-env-template.json | 24 ++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/azure-preview-env-deploy.yml b/.github/workflows/azure-preview-env-deploy.yml index a2c0b5a9803e..f5cfb866e9b8 100644 --- a/.github/workflows/azure-preview-env-deploy.yml +++ b/.github/workflows/azure-preview-env-deploy.yml @@ -198,6 +198,8 @@ jobs: 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 ca9eb90a56aa..82667ab87b94 100644 --- a/azure-preview-env-template.json +++ b/azure-preview-env-template.json @@ -32,6 +32,12 @@ }, "dockerRegistryPassword": { "type": "SecureString" + }, + "storageAccountName": { + "type": "String" + }, + "storageAccountKey": { + "type": "SecureString" } }, "resources": [ @@ -109,12 +115,8 @@ }, "volumeMounts": [ { - "name": "data", + "name": "caddy-data", "mountPath": "/data" - }, - { - "name": "config", - "mountPath": "/config" } ] } @@ -122,12 +124,12 @@ ], "volumes": [ { - "name": "data", - "emptyDir": {} - }, - { - "name": "config", - "emptyDir": {} + "name": "caddy-data", + "azureFile": { + "shareName": "caddy", + "storageAccountName": "[parameters('storageAccountName')]", + "storageAccountKey": "[parameters('storageAccountKey')]" + } } ], "imageRegistryCredentials": [