Closed lindhe closed 3 weeks ago
This is intentional and not a bug. The operator RBAC must be a superset of the Trident RBAC, and it highlights that by having 2 sections of rules, one that duplicates Trident and one that layers on the extra privileges that the operator requires.
Describe the bug There exists duplicate entries for the
namespace
resource in thetrident-operator
ClusterRole:https://github.com/NetApp/trident/blob/ee2d9743551c82635d411da878389ffbd9f5f655/helm/trident-operator/templates/clusterrole.yaml#L10-L16
https://github.com/NetApp/trident/blob/ee2d9743551c82635d411da878389ffbd9f5f655/helm/trident-operator/templates/clusterrole.yaml#L244-L250
This makes it harder than necessary to review what permissions are granted to the application.
Expected behavior
Instead of having one rule for
get
andlist
and one rule forcreate
andpatch
, I would have expected there to be only one rule for all four verbs:Additional context
Note that there are other rules which may seem to also be duplicates, like
podsecuritypolicies
andsecuritycontextconstraints
. These, however, do actually differ since they have specifiedresourceNames
for each "duplicate" entry!