servicemonitor-querier.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {{- with .Values.serviceMonitor }}
  2. {{- if .enabled }}
  3. apiVersion: monitoring.coreos.com/v1
  4. kind: ServiceMonitor
  5. metadata:
  6. name: {{ include "loki.querierFullname" $ }}
  7. {{- with .namespace }}
  8. namespace: {{ . }}
  9. {{- end }}
  10. {{- with .annotations }}
  11. annotations:
  12. {{- toYaml . | nindent 4 }}
  13. {{- end }}
  14. labels:
  15. {{- include "loki.querierLabels" $ | 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.querierSelectorLabels" $ | nindent 6 }}
  27. matchExpressions:
  28. - key: prometheus.io/service-monitor
  29. operator: NotIn
  30. values:
  31. - "false"
  32. endpoints:
  33. - port: http
  34. {{- with .interval }}
  35. interval: {{ . }}
  36. {{- end }}
  37. {{- with .scrapeTimeout }}
  38. scrapeTimeout: {{ . }}
  39. {{- end }}
  40. {{- with .relabelings }}
  41. relabelings:
  42. {{- toYaml . | nindent 8 }}
  43. {{- end }}
  44. {{- with .metricRelabelings }}
  45. metricRelabelings:
  46. {{- toYaml . | nindent 8 }}
  47. {{- end }}
  48. {{- with .scheme }}
  49. scheme: {{ . }}
  50. {{- end }}
  51. {{- with .tlsConfig }}
  52. tlsConfig:
  53. {{- toYaml . | nindent 8 }}
  54. {{- end }}
  55. {{- with .targetLabels }}
  56. targetLabels:
  57. {{- toYaml . | nindent 4 }}
  58. {{- end }}
  59. {{- end }}
  60. {{- end }}