servicemonitor-query-frontend.yaml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {{- with .Values.serviceMonitor }}
  2. {{- if .enabled }}
  3. apiVersion: monitoring.coreos.com/v1
  4. kind: ServiceMonitor
  5. metadata:
  6. name: {{ include "loki.queryFrontendFullname" $ }}
  7. {{- with .namespace }}
  8. namespace: {{ . }}
  9. {{- end }}
  10. {{- with .annotations }}
  11. annotations:
  12. {{- toYaml . | nindent 4 }}
  13. {{- end }}
  14. labels:
  15. {{- include "loki.queryFrontendLabels" $ | nindent 4 }}
  16. {{- with .labels }}
  17. {{- toYaml . | nindent 4 }}
  18. {{- end }}
  19. spec:
  20. {{- with .namespaceSelector }}
  21. namespaceSelector:
  22. {{- toYaml . | nindent 4 }}
  23. {{- end }}
  24. selector:
  25. matchLabels:
  26. {{- include "loki.queryFrontendSelectorLabels" $ | nindent 6 }}
  27. endpoints:
  28. - port: http
  29. {{- with .interval }}
  30. interval: {{ . }}
  31. {{- end }}
  32. {{- with .scrapeTimeout }}
  33. scrapeTimeout: {{ . }}
  34. {{- end }}
  35. {{- with .relabelings }}
  36. relabelings:
  37. {{- toYaml . | nindent 8 }}
  38. {{- end }}
  39. {{- with .metricRelabelings }}
  40. metricRelabelings:
  41. {{- toYaml . | nindent 8 }}
  42. {{- end }}
  43. {{- with .scheme }}
  44. scheme: {{ . }}
  45. {{- end }}
  46. {{- with .tlsConfig }}
  47. tlsConfig:
  48. {{- toYaml . | nindent 8 }}
  49. {{- end }}
  50. {{- with .targetLabels }}
  51. targetLabels:
  52. {{- toYaml . | nindent 4 }}
  53. {{- end }}
  54. {{- end }}
  55. {{- end }}