From a598fbed4d9740d5d7c73833510e32164df81c61 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Tue, 9 Jan 2024 22:25:27 +0100 Subject: [PATCH] fix(template): Add missing permissions for leader role --- helm/template/Chart.yaml | 6 ++++-- helm/template/templates/_leader-role.yaml | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/helm/template/Chart.yaml b/helm/template/Chart.yaml index d9f30c6..7f212d3 100644 --- a/helm/template/Chart.yaml +++ b/helm/template/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: template description: A Helm library chart containing common templates, keeping application templates short type: library -version: 0.3.2 +version: 0.3.3 maintainers: - name: Jim Martens url: https://2martens.de @@ -11,7 +11,9 @@ sources: annotations: artifacthub.io/changes: | - kind: fixed - description: Added missing line break + description: Added missing permission to leader role + - kind: fixed + description: Bind correct role artifacthub.io/signKey: | fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8 url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc diff --git a/helm/template/templates/_leader-role.yaml b/helm/template/templates/_leader-role.yaml index 941cbc0..1aa4eb3 100644 --- a/helm/template/templates/_leader-role.yaml +++ b/helm/template/templates/_leader-role.yaml @@ -7,11 +7,25 @@ metadata: namespace: {{ .Release.Namespace }} rules: - verbs: + - get - watch + - list + - create + - update + - patch + - delete resources: - configmaps apiGroups: - "" + - verbs: + - get + - watch + - list + resources: + - pods + apiGroups: + - "" {{ end }} {{ end }} --- @@ -23,7 +37,7 @@ metadata: name: leader-role-binding namespace: {{ .Release.Namespace }} roleRef: - name: {{ include "template.fullname" . }} + name: leader-role apiGroup: rbac.authorization.k8s.io kind: Role subjects: