Skip to content

Commit

Permalink
chore: reformat webhook rbac file (#883)
Browse files Browse the repository at this point in the history
* chore: reformat webhook rbac file

Signed-off-by: Tuan Anh Tran <[email protected]>

* chore: reformat rbac file

Signed-off-by: Tuan Anh Tran <[email protected]>
  • Loading branch information
tuananh authored Dec 2, 2021
1 parent d782e79 commit a156e6d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 116 deletions.
119 changes: 31 additions & 88 deletions charts/karpenter/templates/controller/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,97 +31,40 @@ metadata:
name: karpenter-controller
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: [""]
resources: ["configmaps/status"]
verbs: ["get", "update", "patch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: karpenter-controller
rules:
- apiGroups:
- karpenter.sh
resources:
- provisioners
- provisioners/status
verbs:
- create
- delete
- patch
- get
- list
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- get
- patch
- update
- watch
- apiGroups:
- ""
resources:
- nodes
- pods
verbs:
- get
- list
- watch
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- update
- apiGroups:
- ""
resources:
- nodes
verbs:
- create
- apiGroups:
- ""
resources:
- pods/binding
- pods/eviction
verbs:
- create
- apiGroups:
- apps
resources:
- daemonsets
verbs:
- list
- watch
- apiGroups: ["karpenter.sh"]
resources: ["provisioners", "provisioners/status"]
verbs: ["create", "delete", "patch", "get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["create", "get", "patch", "update", "watch"]
- apiGroups: [""]
resources: ["nodes", "pods"]
verbs: ["get", "list", "watch", "patch", "delete"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["create"]
- apiGroups: [""]
resources: ["pods/binding", "pods/eviction"]
verbs: ["create"]
- apiGroups: ["apps"]
resources: ["daemonsets"]
verbs: ["list", "watch"]
---
37 changes: 9 additions & 28 deletions charts/karpenter/templates/webhook/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,38 +34,19 @@ rules:
- apiGroups: [""]
resources: ["configmaps", "namespaces"]
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- update
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- watch
- create
- update
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "create", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: karpenter-webhook
rules:
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingwebhookconfigurations
- mutatingwebhookconfigurations
verbs:
- get
- watch
- list
- update
- apiGroups: ["admissionregistration.k8s.io"]
resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"]
verbs: ["get", "watch", "list", "update"]
---

0 comments on commit a156e6d

Please sign in to comment.