servicemonitor-index-gateway.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {{- if .Values.indexGateway.enabled }}
  2. {{- with .Values.serviceMonitor }}
  3. {{- if .enabled }}
  4. apiVersion: monitoring.coreos.com/v1
  5. kind: ServiceMonitor
  6. metadata:
  7. name: {{ include "loki.indexGatewayFullname" $ }}
  8. {{- with .namespace }}
  9. namespace: {{ . }}
  10. {{- end }}
  11. {{- with .annotations }}
  12. annotations:
  13. {{- toYaml . | nindent 4 }}
  14. {{- end }}
  15. labels:
  16. {{- include "loki.indexGatewayLabels" $ | nindent 4 }}
  17. {{- with .labels }}
  18. {{- toYaml . | nindent 4 }}
  19. {{- end }}
  20. spec:
  21. {{- with .namespaceSelector }}
  22. namespaceSelector:
  23. {{- toYaml . | nindent 4 }}
  24. {{- end }}
  25. selector:
  26. matchLabels:
  27. {{- include "loki.indexGatewaySelectorLabels" $ | nindent 6 }}
  28. matchExpressions:
  29. - key: prometheus.io/service-monitor
  30. operator: NotIn
  31. values:
  32. - "false"
  33. endpoints:
  34. - port: http
  35. {{- with .interval }}
  36. interval: {{ . }}
  37. {{- end }}
  38. {{- with .scrapeTimeout }}
  39. scrapeTimeout: {{ . }}
  40. {{- end }}
  41. {{- with .relabelings }}
  42. relabelings:
  43. {{- toYaml . | nindent 8 }}
  44. {{- end }}
  45. {{- with .metricRelabelings }}
  46. metricRelabelings:
  47. {{- toYaml . | nindent 8 }}
  48. {{- end }}
  49. {{- with .scheme }}
  50. scheme: {{ . }}
  51. {{- end }}
  52. {{- with .tlsConfig }}
  53. tlsConfig:
  54. {{- toYaml . | nindent 8 }}
  55. {{- end }}
  56. {{- with .targetLabels }}
  57. targetLabels:
  58. {{- toYaml . | nindent 4 }}
  59. {{- end }}
  60. {{- end }}
  61. {{- end }}
  62. {{- end }}