mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: fix incorrect rendering of RBAC in Helm chart when workspacePerms=false (#20569)
This commit is contained in:
@@ -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) }}
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user