Skip to content

Commit

Permalink
Remove sasToken from datasettestinputs
Browse files Browse the repository at this point in the history
  • Loading branch information
BMurri committed Nov 4, 2024
1 parent 72d525d commit 1bf4dbf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 11 additions & 3 deletions src/deploy-cromwell-on-azure/KubernetesManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ internal class KubernetesManager
.Handle<WebSocketException>(ex => ex.WebSocketErrorCode == WebSocketError.NotAWebSocket)
.WaitAndRetryAsync(200, retryAttempt => TimeSpan.FromSeconds(5));

private static readonly HashSet<string> testStorageAccounts = new HashSet<string> { "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";
Expand Down Expand Up @@ -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)
{
_ = datasettestinputs.Remove("sasToken");
}
}
}

public async Task<Dictionary<string, string>> GetAKSSettingsAsync(Azure.ResourceManager.Storage.StorageAccountData storageAccount)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1bf4dbf

Please sign in to comment.