From ce0a47fb9710c5a4e0d7b8cf38e00618d02bdd5b Mon Sep 17 00:00:00 2001 From: Lukasz Zajaczkowski Date: Mon, 5 Dec 2022 09:00:22 +0100 Subject: [PATCH] change valuesYaml to output --- plural/helm/console/values.yaml.lua | 45 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/plural/helm/console/values.yaml.lua b/plural/helm/console/values.yaml.lua index ce58edd624..04ad7f8177 100755 --- a/plural/helm/console/values.yaml.lua +++ b/plural/helm/console/values.yaml.lua @@ -1,4 +1,4 @@ -valuesYaml = { +output = { global={ application={ links={ @@ -8,14 +8,11 @@ valuesYaml = { } } }, - enabled=true, - ingressClass="nginx", - replicaCount=2, provider=Var.Provider, license=Var.License, ingress={ - console_dns=Var.Values.console_dns + console_dns=Var.Values.console_dns, }, serviceAccount= { create=true, @@ -43,27 +40,27 @@ valuesYaml = { } if Var.Provider == "kind" then - valuesYaml.ingress.annotations = { + output.ingress.annotations = { "external-dns.alpha.kubernetes.io/target: '127.0.0.1'" } - valuesYaml.replicaCount=1 + output.replicaCount=1 end if Var.Provider == "google" then - valuesYaml.serviceAccount.create = false + output.serviceAccount.create = false end if Var.Provider == "azure" then - valuesYaml.podLabels={ + output.podLabels={ "aadpodidbinding: console" } - valuesYaml.consoleIdentityId=importValue("Terraform", "console_msi_id") - valuesYaml.consoleIdentityClientId=importValue("Terraform", "console_msi_client_id") + output.consoleIdentityId=importValue("Terraform", "console_msi_id") + output.consoleIdentityClientId=importValue("Terraform", "console_msi_client_id") - valuesYaml.extraEnv={ + output.extraEnv={ { name="ARM_USE_MSI", - value = true + value = 'true' }, { @@ -79,32 +76,32 @@ if Var.Provider == "azure" then end if Var.OIDC ~= nil then - valuesYaml.secrets.plural_client_id=Var.OIDC.ClientId - valuesYaml.secrets.plural_client_secret=Var.OIDC.ClientSecret + output.secrets.plural_client_id=Var.OIDC.ClientId + output.secrets.plural_client_secret=Var.OIDC.ClientSecret end if Var.Values.is_demo then - valuesYaml.secrets.is_demo=Var.Values.is_demo + output.secrets.is_demo=Var.Values.is_demo end if Var.Values.console_dns then local gitUrl=dig("console", "secrets", "git_url", "default", Var) local identity=pathJoin(repoRoot(), ".plural-crypt", "identity") if gitUrl == "default" or gitUrl == "" then - valuesYaml.secrets.git_url=repoUrl() + output.secrets.git_url=repoUrl() else - valuesYaml.secrets.git_url=gitUrl + output.secrets.git_url=gitUrl end - valuesYaml.secrets.repo_root=repoName() - valuesYaml.secrets.branch_name=branchName() - valuesYaml.secrets.config=readFile(pathJoin(homeDir(),".plural","config.yml")) + output.secrets.repo_root=repoName() + output.secrets.branch_name=branchName() + output.secrets.config=readFile(pathJoin(homeDir(),".plural","config.yml")) if fileExists(identity) then - valuesYaml.secrets.identity=readFile(identity) + output.secrets.identity=readFile(identity) elseif dig("console", "secrets", "identity", "default", Var) ~= "default" then - valuesYaml.secrets.identity= Var.console.secrets.identity + output.secrets.identity= Var.console.secrets.identity else - valuesYaml.secrets.key=readFile(pathJoin(homeDir(), ".plural", "key")) + output.secrets.key=readFile(pathJoin(homeDir(), ".plural", "key")) end end