Skip to content

Commit

Permalink
add limitranges and storageclasses rbacs to orch explorer feature (#1166
Browse files Browse the repository at this point in the history
) (#1167)
  • Loading branch information
celenechang committed May 3, 2024
1 parent e61af60 commit 9d259b6
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions controllers/datadogagent/feature/orchestratorexplorer/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func getRBACPolicyRules(logger logr.Logger, crs []string) []rbacv1.PolicyRule {
rbac.PodsResource,
rbac.ServicesResource,
rbac.NodesResource,
rbac.PersistentVolumesResource,
rbac.PersistentVolumeClaimsResource,
rbac.ServiceAccountResource,
rbac.LimitRangesResource,
},
},
{
Expand All @@ -62,20 +66,6 @@ func getRBACPolicyRules(logger logr.Logger, crs []string) []rbacv1.PolicyRule {
rbac.CronjobsResource,
},
},

{
APIGroups: []string{rbac.CoreAPIGroup},
Resources: []string{
rbac.PersistentVolumesResource,
rbac.PersistentVolumeClaimsResource,
},
},
{
APIGroups: []string{rbac.CoreAPIGroup},
Resources: []string{
rbac.ServiceAccountResource,
},
},
{
APIGroups: []string{rbac.RbacAPIGroup},
Resources: []string{
Expand All @@ -101,6 +91,10 @@ func getRBACPolicyRules(logger logr.Logger, crs []string) []rbacv1.PolicyRule {
APIGroups: []string{rbac.AutoscalingAPIGroup},
Resources: []string{rbac.HorizontalPodAutoscalersRecource},
},
{
APIGroups: []string{rbac.StorageAPIGroup},
Resources: []string{rbac.StorageClassesResource},
},
}

groupResources := mapAPIGroupsResources(logger, crs)
Expand Down

0 comments on commit 9d259b6

Please sign in to comment.