{{- if (.Values.global.rbac) -}}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: {{ printf "%s:drycc-logger-fluentbit" .Release.Namespace | quote }}
  labels:
    app: drycc-logger-fluentbit
    heritage: drycc
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: {{ printf "%s:drycc-logger-fluentbit" .Release.Namespace | quote }}
subjects:
- kind: ServiceAccount
  name: drycc-logger-fluentbit
  namespace: {{ .Release.Namespace }}
{{- end -}}
