{{- if .Values.adotCollector.daemonSet.enabled }} # ClusterRoleBinding for ADOT Collector as a DaemonSet references and grants permissions defined in ClusterRole to service accounts/users/groups in subjects. kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: {{ .Values.adotCollector.daemonSet.clusterRoleBindingName }} labels: {{- include "adotCollector.daemonSet.labels" . | indent 4 }} subjects: - kind: ServiceAccount name: {{ .Values.adotCollector.daemonSet.serviceAccount.name }} namespace: {{ include "adotCollector.daemonSet.namespace" . }} roleRef: kind: ClusterRole name: {{ .Values.adotCollector.daemonSet.clusterRoleName }} apiGroup: rbac.authorization.k8s.io {{- end }}