mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 16:46:51 +02:00
fix(template): Move leader role template to root folder
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
{{- define "template.leaderRole" -}}
|
||||
{{- if .Values.leaderElection.enabled -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: leader-role
|
||||
namespace: {{ .Release.Namespace }}
|
||||
rules:
|
||||
- verbs:
|
||||
- watch
|
||||
resources:
|
||||
- configmaps
|
||||
apiGroups:
|
||||
- ""
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- define "template.leaderRoleBinding" -}}
|
||||
{{- if .Values.leaderElection.enabled -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: leader-role-binding
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
name: {{ include "template.fullname" . }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "template.serviceAccountName" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user