59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: {{ include "koor-operator.fullname" . }}-leader-election-role
|
|
labels:
|
|
app.kubernetes.io/component: rbac
|
|
app.kubernetes.io/created-by: koor-operator
|
|
app.kubernetes.io/part-of: koor-operator
|
|
{{- include "koor-operator.labels" . | nindent 4 }}
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- configmaps
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
- create
|
|
- update
|
|
- patch
|
|
- delete
|
|
- apiGroups:
|
|
- coordination.k8s.io
|
|
resources:
|
|
- leases
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
- create
|
|
- update
|
|
- patch
|
|
- delete
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- events
|
|
verbs:
|
|
- create
|
|
- patch
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: {{ include "koor-operator.fullname" . }}-leader-election-rolebinding
|
|
labels:
|
|
app.kubernetes.io/component: rbac
|
|
app.kubernetes.io/created-by: koor-operator
|
|
app.kubernetes.io/part-of: koor-operator
|
|
{{- include "koor-operator.labels" . | nindent 4 }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: '{{ include "koor-operator.fullname" . }}-leader-election-role'
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: '{{ include "koor-operator.fullname" . }}-controller-manager'
|
|
namespace: '{{ .Release.Namespace }}' |