24 lines
643 B
YAML
24 lines
643 B
YAML
{{- if and .Values.monitor.enabled }}
|
|
{{- if .Values.monitor.useNamespaceWideRole }}
|
|
kind: RoleBinding
|
|
{{- else }}
|
|
kind: ClusterRoleBinding
|
|
{{- end }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: {{ include "cf-monitor.fullname" . }}
|
|
labels: {{- include "cf-monitor.labels" . | nindent 4 }}
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: {{ include "cf-monitor.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
{{- if .Values.monitor.useNamespaceWideRole }}
|
|
kind: Role
|
|
{{- else }}
|
|
kind: ClusterRole
|
|
{{- end }}
|
|
name: {{ include "cf-monitor.fullname" . }}
|
|
{{- end }}
|