fix: fix incorrect rendering of RBAC in Helm chart when workspacePerms=false (#20569)

This commit is contained in:
Rowan Smith
2025-10-31 05:22:23 +11:00
committed by GitHub
parent d80b5fc8ed
commit 30d2fc8bfc
3 changed files with 4 additions and 88 deletions
+4 -2
View File
@@ -1,7 +1,9 @@
{{- define "libcoder.rbac.forNamespace" -}}
{{- $nsPerms := ternary .workspacePerms .Top.Values.coder.serviceAccount.workspacePerms (hasKey . "workspacePerms") -}}
{{- $nsDeploy := ternary .enableDeployments .Top.Values.coder.serviceAccount.enableDeployments (hasKey . "enableDeployments") -}}
{{- $nsExtra := ternary .extraRules .Top.Values.coder.serviceAccount.extraRules (hasKey . "extraRules") -}}
{{- $nsDeployRaw := ternary .enableDeployments .Top.Values.coder.serviceAccount.enableDeployments (hasKey . "enableDeployments") -}}
{{- $nsExtraRaw := ternary .extraRules .Top.Values.coder.serviceAccount.extraRules (hasKey . "extraRules") -}}
{{- $nsDeploy := and $nsPerms $nsDeployRaw -}}
{{- $nsExtra := ternary $nsExtraRaw (list) $nsPerms -}}
{{- if or $nsPerms (or $nsDeploy $nsExtra) }}
---