Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
rowansmithau merged 2 commits intomainfromrowan/helm_rbac_fix
Oct 30, 2025

Conversation

@rowansmithau
Copy link
Contributor

closes#20562.

When I addedworkspaceNamespaces it caused an issue whenworkspacePerms is set tofalse in that the Role & RoleBinding was still created.

Update withworkspacePerms=false:

➜  coder git:(rowan/helm_rbac_fix) ✗ helm template coder . --version=2.27.2  --set coder.image.tag=v2.27.2 --set coder.serviceAccount.workspacePerms=false | grep -A11 -B46 RoleBinding➜  coder git:(rowan/helm_rbac_fix) ✗

Update withworkspacePerms=true:

➜  coder git:(rowan/helm_rbac_fix) ✗ helm template coder . --version=2.27.2  --set coder.image.tag=v2.27.2 --set coder.serviceAccount.workspacePerms=true | grep -A12 -B60 RoleBinding# Source: coder/templates/coder.yamlapiVersion: v1kind: ServiceAccountmetadata:  annotations: {}  labels:    app.kubernetes.io/instance: coder    app.kubernetes.io/managed-by: Helm    app.kubernetes.io/name: coder    app.kubernetes.io/part-of: coder    app.kubernetes.io/version: 0.1.0    helm.sh/chart: coder-0.1.0  name: coder  namespace: default---# Source: coder/templates/rbac.yamlapiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata:  name: coder-workspace-perms  namespace: defaultrules:  - apiGroups: [""]    resources: ["pods"]    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch  - apiGroups: [""]    resources: ["persistentvolumeclaims"]    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch  - apiGroups:    - apps    resources:    - deployments    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch---# Source: coder/templates/rbac.yamlapiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata:  name: "coder"  namespace: defaultsubjects:  - kind: ServiceAccount    name: "coder"roleRef:  apiGroup: rbac.authorization.k8s.io  kind: Role  name: coder-workspace-perms---# Source: coder/templates/service.yaml

Update withworkspacePerms=false andworkspaceNamespaces populated:

➜  coder git:(rowan/helm_rbac_fix) ✗ helm template coder . --version=2.27.2  --set coder.image.tag=v2.27.2 --set coder.serviceAccount.workspacePerms=false --set-json 'coder.serviceAccount.workspaceNamespaces=[{"name":"dev-ws","workspacePerms":true,"enableDeployments":true,"extraRules":[]}]' | grep -A15 -B105 RoleBinding---# Source: coder/templates/coder.yamlapiVersion: v1kind: ServiceAccountmetadata:  annotations: {}  labels:    app.kubernetes.io/instance: coder    app.kubernetes.io/managed-by: Helm    app.kubernetes.io/name: coder    app.kubernetes.io/part-of: coder    app.kubernetes.io/version: 0.1.0    helm.sh/chart: coder-0.1.0  name: coder  namespace: default---# Source: coder/templates/rbac.yamlapiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata:  name: coder-workspace-perms  namespace: dev-wsrules:  - apiGroups: [""]    resources: ["pods"]    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch  - apiGroups: [""]    resources: ["persistentvolumeclaims"]    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch  - apiGroups:    - apps    resources:    - deployments    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch---# Source: coder/templates/rbac.yamlapiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata:  name: "coder"  namespace: dev-wssubjects:  - kind: ServiceAccount    name: "coder"    namespace: defaultroleRef:  apiGroup: rbac.authorization.k8s.io  kind: Role  name: coder-workspace-perms---# Source: coder/templates/service.yamlapiVersion: v1kind: Service

Update withworkspacePerms=true andworkspaceNamespaces populated:

➜  coder git:(rowan/helm_rbac_fix) ✗ helm template coder . --version=2.27.2  --set coder.image.tag=v2.27.2 --set coder.serviceAccount.workspacePerms=true --set-json 'coder.serviceAccount.workspaceNamespaces=[{"name":"dev-ws","workspacePerms":true,"enableDeployments":true,"extraRules":[]}]' | grep -A15 -B105 RoleBinding             ---# Source: coder/templates/coder.yamlapiVersion: v1kind: ServiceAccountmetadata:  annotations: {}  labels:    app.kubernetes.io/instance: coder    app.kubernetes.io/managed-by: Helm    app.kubernetes.io/name: coder    app.kubernetes.io/part-of: coder    app.kubernetes.io/version: 0.1.0    helm.sh/chart: coder-0.1.0  name: coder  namespace: default---# Source: coder/templates/rbac.yamlapiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata:  name: coder-workspace-perms  namespace: defaultrules:  - apiGroups: [""]    resources: ["pods"]    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch  - apiGroups: [""]    resources: ["persistentvolumeclaims"]    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch  - apiGroups:    - apps    resources:    - deployments    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch---# Source: coder/templates/rbac.yamlapiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata:  name: coder-workspace-perms  namespace: dev-wsrules:  - apiGroups: [""]    resources: ["pods"]    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch  - apiGroups: [""]    resources: ["persistentvolumeclaims"]    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch  - apiGroups:    - apps    resources:    - deployments    verbs:    - create    - delete    - deletecollection    - get    - list    - patch    - update    - watch---# Source: coder/templates/rbac.yamlapiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata:  name: "coder"  namespace: defaultsubjects:  - kind: ServiceAccount    name: "coder"roleRef:  apiGroup: rbac.authorization.k8s.io  kind: Role  name: coder-workspace-perms---# Source: coder/templates/rbac.yamlapiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata:  name: "coder"  namespace: dev-wssubjects:  - kind: ServiceAccount    name: "coder"    namespace: defaultroleRef:  apiGroup: rbac.authorization.k8s.io  kind: Role  name: coder-workspace-perms---# Source: coder/templates/service.yamlapiVersion: v1kind: Service➜  coder git:(rowan/helm_rbac_fix) ✗

@rowansmithaurowansmithau self-assigned thisOct 30, 2025
@rowansmithaurowansmithau added the helmArea: helm chart labelOct 30, 2025
@rowansmithaurowansmithau changed the titlebug: fix on Helm chart for workspacePerms=false incorrectly rendering RBAC when it should notfix: fix incorrect rendering of RBAC in Helm chart when workspacePerms=falseOct 30, 2025
@rowansmithaurowansmithau marked this pull request as ready for reviewOctober 30, 2025 01:11
@rowansmithaurowansmithau merged commit30d2fc8 intomainOct 30, 2025
32 checks passed
@rowansmithaurowansmithau deleted the rowan/helm_rbac_fix branchOctober 30, 2025 18:22
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 30, 2025
@stirbystirby added cherry-pick/v2.28Needs to be cherry-picked to the 2.28 release branch helmArea: helm chart cherry-pick/v2.27Items to be pulled in for the v2.27 release. and removed helmArea: helm chart labelsOct 30, 2025
@david-fraley
Copy link
Collaborator

/cherry-pick release/2.27

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@rowansmithaurowansmithau

Labels

cherry-pick/v2.27Items to be pulled in for the v2.27 release.cherry-pick/v2.28Needs to be cherry-picked to the 2.28 release branchhelmArea: helm chart

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

bug: Helm chart (v2.27 and up) inadvertently rendering roles and rolebindings although coder.serviceAccount.workspacePerms is set to false

5 participants

@rowansmithau@david-fraley@deansheather@stirby

[8]ページ先頭

©2009-2025 Movatter.jp