Skip to content

Commit

Permalink
Merge pull request #140 from Vacant2333/add-metrics-nodes-clusterrole
Browse files Browse the repository at this point in the history
chore: add clusterrole for node metrics resource
  • Loading branch information
jwcesign authored Nov 21, 2024
2 parents b74372d + fda4111 commit 33b7095
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
16 changes: 5 additions & 11 deletions charts/karpenter/templates/clusterrole-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ metadata:
{{- end }}
rules:
# Read
- apiGroups: ["karpenter.sh"]
resources: ["nodepools", "nodepools/status", "nodeclaims", "nodeclaims/status"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["pods", "nodes", "persistentvolumes", "persistentvolumeclaims", "replicationcontrollers", "namespaces"]
verbs: ["get", "list", "watch"]
Expand All @@ -47,16 +44,13 @@ rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get", "list", "watch"]
- apiGroups: [ "coordination.k8s.io" ]
resources: [ "leases" ]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
# Write
- apiGroups: ["karpenter.sh"]
resources: ["nodeclaims", "nodeclaims/status"]
verbs: ["create", "delete", "update", "patch"]
- apiGroups: ["karpenter.sh"]
resources: ["nodepools", "nodepools/status"]
verbs: ["update", "patch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
Expand Down
9 changes: 9 additions & 0 deletions charts/karpenter/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@ rules:
- apiGroups: ["karpenter.k8s.alibabacloud"]
resources: ["ecsnodeclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [ "karpenter.sh" ]
resources: [ "nodepools", "nodepools/status", "nodeclaims", "nodeclaims/status" ]
verbs: [ "get", "list", "watch" ]
# Write
- apiGroups: ["karpenter.k8s.alibabacloud"]
resources: ["ecsnodeclasses", "ecsnodeclasses/status"]
verbs: ["patch", "update"]
- apiGroups: [ "karpenter.sh" ]
resources: [ "nodeclaims", "nodeclaims/status" ]
verbs: [ "create", "delete", "update", "patch" ]
- apiGroups: [ "karpenter.sh" ]
resources: [ "nodepools", "nodepools/status" ]
verbs: [ "update", "patch" ]

0 comments on commit 33b7095

Please sign in to comment.