31 lines
876 B
YAML
31 lines
876 B
YAML
{{- if .Values.rbac.create -}}
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: {{ template "service.fullname" . }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels:
|
|
app: {{ include "service.fullname" . }}
|
|
release: {{ .Release.Name }}
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["services", "pods", "endpoints", "configmaps"]
|
|
verbs: ["get","list"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: {{ template "service.fullname" . }}
|
|
labels:
|
|
app: {{ include "service.fullname" . }}
|
|
release: {{ .Release.Name }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: {{ template "service.fullname" . }}
|
|
subjects:
|
|
- name: {{ template "service.serviceAccountName" . }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
kind: serviceAccount
|
|
{{- end -}}
|