grafana-agent.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. {{- with (.Values.metaMonitoring).grafanaAgent }}
  2. {{- if .enabled }}
  3. apiVersion: monitoring.grafana.com/v1alpha1
  4. kind: GrafanaAgent
  5. metadata:
  6. name: {{ include "tempo.resourceName" (dict "ctx" $ "component" "meta-monitoring") }}
  7. namespace: {{ .namespace | default $.Release.Namespace | quote }}
  8. labels:
  9. {{- include "tempo.labels" (dict "ctx" $ "component" "meta-monitoring" ) | nindent 4 }}
  10. {{- with .labels }}
  11. {{- toYaml . | nindent 4 }}
  12. {{- end }}
  13. {{- with .annotations }}
  14. annotations:
  15. {{- toYaml . | nindent 4 }}
  16. {{- end }}
  17. spec:
  18. serviceAccountName: {{ include "tempo.resourceName" (dict "ctx" $ "component" "grafana-agent") }}
  19. logs:
  20. instanceSelector:
  21. matchLabels:
  22. {{- include "tempo.selectorLabels" (dict "ctx" $ "component" "meta-monitoring") | nindent 8 }}
  23. # cluster label for logs is added in the LogsInstance
  24. metrics:
  25. instanceSelector:
  26. matchLabels:
  27. {{- include "tempo.selectorLabels" (dict "ctx" $ "component" "meta-monitoring") | nindent 8 }}
  28. externalLabels:
  29. cluster: {{ include "tempo.clusterName" $ }}
  30. {{- end }}
  31. {{- end }}