clusterrolebinding.yaml 1008 B

12345678910111213141516171819202122
  1. {{- if or (.Values.clusterRole.create) (.Values.presets.kubernetesAttributes.enabled) (.Values.presets.clusterMetrics.enabled) (.Values.presets.kubeletMetrics.enabled) (.Values.presets.kubernetesEvents.enabled) -}}
  2. apiVersion: rbac.authorization.k8s.io/v1
  3. kind: ClusterRoleBinding
  4. metadata:
  5. name: {{ include "opentelemetry-collector.clusterRoleBindingName" . }}
  6. labels:
  7. {{- include "opentelemetry-collector.labels" . | nindent 4 }}
  8. {{- if .Values.clusterRole.clusterRoleBinding.annotations }}
  9. annotations:
  10. {{- range $key, $value := .Values.clusterRole.clusterRoleBinding.annotations }}
  11. {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
  12. {{- end }}
  13. {{- end }}
  14. roleRef:
  15. apiGroup: rbac.authorization.k8s.io
  16. kind: ClusterRole
  17. name: {{ include "opentelemetry-collector.clusterRoleName" . }}
  18. subjects:
  19. - kind: ServiceAccount
  20. name: {{ include "opentelemetry-collector.serviceAccountName" . }}
  21. namespace: {{ include "opentelemetry-collector.namespace" . }}
  22. {{- end }}