Skip to content

Commit

Permalink
chore: Remove RBAC permissions for node lease garbage collection
Browse files Browse the repository at this point in the history
  • Loading branch information
jigisha620 committed Aug 21, 2024
1 parent 1460366 commit 095c7e3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 44 deletions.
21 changes: 0 additions & 21 deletions charts/karpenter/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,3 @@ rules:
resources: ["services"]
resourceNames: ["kube-dns"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "karpenter.fullname" . }}-lease
namespace: kube-node-lease
labels:
{{- include "karpenter.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
# Read
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch"]
# Write
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["delete"]
20 changes: 0 additions & 20 deletions charts/karpenter/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,6 @@ roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "karpenter.fullname" . }}-dns
subjects:
- kind: ServiceAccount
name: {{ template "karpenter.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "karpenter.fullname" . }}-lease
namespace: kube-node-lease
labels:
{{- include "karpenter.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "karpenter.fullname" . }}-lease
subjects:
- kind: ServiceAccount
name: {{ template "karpenter.serviceAccountName" . }}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
knative.dev/pkg v0.0.0-20231010144348-ca8c009405dd
sigs.k8s.io/controller-runtime v0.18.5
sigs.k8s.io/karpenter v1.0.1-0.20240820174000-8e40c0c92224
sigs.k8s.io/karpenter v1.0.1-0.20240821214627-9469d1919054
sigs.k8s.io/yaml v1.4.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,8 @@ sigs.k8s.io/controller-runtime v0.18.5 h1:nTHio/W+Q4aBlQMgbnC5hZb4IjIidyrizMai9P
sigs.k8s.io/controller-runtime v0.18.5/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/karpenter v1.0.1-0.20240820174000-8e40c0c92224 h1:T1OTA/jwiqWp55+gb8CCT5PoyZjIywjspe9UuLU/dgc=
sigs.k8s.io/karpenter v1.0.1-0.20240820174000-8e40c0c92224/go.mod h1:e6yDwyO/5+h2NqTkvMmHf9ae/UnKbsOdSYuAnV0NErQ=
sigs.k8s.io/karpenter v1.0.1-0.20240821214627-9469d1919054 h1:sazFOdf0qboIt5Zx+XPor7iX0H9zfEZCyCeuYHbhhbE=
sigs.k8s.io/karpenter v1.0.1-0.20240821214627-9469d1919054/go.mod h1:e6yDwyO/5+h2NqTkvMmHf9ae/UnKbsOdSYuAnV0NErQ=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
Expand Down

0 comments on commit 095c7e3

Please sign in to comment.