diff --git a/src/deploy-cromwell-on-azure/KubernetesManager.cs b/src/deploy-cromwell-on-azure/KubernetesManager.cs index 174f5798..4e59d3a7 100644 --- a/src/deploy-cromwell-on-azure/KubernetesManager.cs +++ b/src/deploy-cromwell-on-azure/KubernetesManager.cs @@ -36,8 +36,6 @@ internal class KubernetesManager .Handle(ex => ex.WebSocketErrorCode == WebSocketError.NotAWebSocket) .WaitAndRetryAsync(200, retryAttempt => TimeSpan.FromSeconds(5)); - private static readonly HashSet testStorageAccounts = new HashSet { "datasettestinputs", "datasettestinputssouthc" }; - // "master" is used despite not being a best practice: https://github.com/kubernetes-sigs/blob-csi-driver/issues/783 private const string BlobCsiDriverGithubReleaseBranch = "master"; private const string BlobCsiDriverGithubReleaseVersion = "v1.24.0"; @@ -222,11 +220,21 @@ public async Task UpgradeValuesYamlAsync(Azure.ResourceManager.Storage.StorageAc private static void ProcessHelmValuesUpdates(HelmValues values, Version previousVersion) { - if (previousVersion < new Version(4, 3)) + if (previousVersion is null || previousVersion < new Version(4, 3)) { values.CromwellContainers = [Deployer.ConfigurationContainerName, Deployer.ExecutionsContainerName, Deployer.LogsContainerName, Deployer.OutputsContainerName]; values.DefaultContainers = [Deployer.InputsContainerName]; } + + if (previousVersion is null || previousVersion < new Version(5, 5, 0)) + { + var datasettestinputs = values.ExternalSasContainers.SingleOrDefault(container => container.TryGetValue("accountName", out var name) && "datasettestinputs".Equals(name, StringComparison.OrdinalIgnoreCase)); + + if (datasettestinputs is not null) + { + _ = values.ExternalSasContainers.Remove(datasettestinputs); + } + } } public async Task> GetAKSSettingsAsync(Azure.ResourceManager.Storage.StorageAccountData storageAccount) diff --git a/src/deploy-cromwell-on-azure/scripts/helm/values-template.yaml b/src/deploy-cromwell-on-azure/scripts/helm/values-template.yaml index 37d3d345..cb0b2331 100644 --- a/src/deploy-cromwell-on-azure/scripts/helm/values-template.yaml +++ b/src/deploy-cromwell-on-azure/scripts/helm/values-template.yaml @@ -101,10 +101,8 @@ externalSasContainers: #[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Public example, not confidential")] sasToken: "si=coa&spr=https&sv=2022-11-02&sr=c&sig=Updk4aRmzWJai%2BhtQaLjNJAVq5jwc5M4frsCBTjIj%2FM%3D" containerName: dataset - - accountName: datasettestinputs -#[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Public example, not confidential")] - sasToken: "sv=2018-03-28&sr=c&si=coa&sig=nKoK6dxjtk5172JZfDH116N6p3xTs7d%2Bs5EAUE4qqgM%3D" - containerName: dataset +# - accountName: datasettestinputs +# containerName: dataset # - accountName: storageAccount # sasToken: "" # containerName: test-inputs