logs-instance.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {{- with (.Values.metaMonitoring).grafanaAgent }}
  2. {{- if .enabled }}
  3. apiVersion: monitoring.grafana.com/v1alpha1
  4. kind: LogsInstance
  5. metadata:
  6. name: {{ include "tempo.resourceName" (dict "ctx" $ "component" "meta-monitoring") }}
  7. namespace: {{ (($.Values.metaMonitoring).grafanaAgent).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. clients:
  19. {{- if or (.logs).additionalClientConfigs (.logs).remote }}
  20. {{- range $i, $cfg := prepend ((.logs).additionalClientConfigs | default list) (.logs).remote }}
  21. {{- with $cfg }}
  22. {{- if $cfg.url }}
  23. - {{- include "tempo.metaMonitoring.logs.client" (dict "ctx" $ "url" .url "auth" .auth "usernameKey" (printf "username-%d" $i)) | nindent 6 -}}
  24. {{- end }}
  25. {{- end }}
  26. {{- end }}
  27. {{- end }}
  28. # Supply an empty namespace selector to look in all namespaces. Remove
  29. # this to only look in the same namespace as the LogsInstance CR
  30. podLogsNamespaceSelector: {}
  31. podLogsSelector:
  32. matchLabels:
  33. {{- include "tempo.selectorLabels" (dict "ctx" $) | nindent 6 }}
  34. {{- end -}}
  35. {{- end -}}