Skip to content

lambda-controller: ClusterRoleBinding roleRef typo #2600

@gideonmillsfs

Description

@gideonmillsfs

Describe the bug
Mismatch between ClusterRole name and reference in ClusterRoleBinding for namespace cache

Steps to reproduce

  1. Modify the <fullname>-namespace-caches ClusterRoleBinding to add a User (with no other bindings) as a subject
  2. Assume this user identity
  3. Run kubectl get namespaces and observe this error
    Error from server (Forbidden): namespaces is forbidden: User "..." cannot list resource "namespaces" in API group "" at the cluster scope:
    RBAC: clusterrole.rbac.authorization.k8s.io "ack-lambda-controller-lambda-chart-namespace-caches" not found
    

Expected outcome
User is able to list and view namespaces, by being bound to the <fullname>-namespaces-cache ClusterRole

Diagnosis
The ClusterRole is named <fullname>-namespaces-cache, whereas the roleRef in the ClusterRoleBinding points to <fullname>-namespace-caches (note the difference in pluralization).

Environment

  • Kubernetes version: 1.31
  • Using EKS: yes, eks.32
  • AWS service targeted: lambda

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions