podmonitor.yaml 738 B

123456789101112131415161718
  1. {{- if and .Values.podMonitor.enabled .Values.podMonitor.metricsEndpoints (eq .Values.mode "daemonset") }}
  2. apiVersion: monitoring.coreos.com/v1
  3. kind: PodMonitor
  4. metadata:
  5. name: {{ include "opentelemetry-collector.fullname" . }}-agent
  6. labels:
  7. {{- include "opentelemetry-collector.labels" . | nindent 4 }}
  8. {{- range $key, $value := .Values.podMonitor.extraLabels }}
  9. {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
  10. {{- end }}
  11. spec:
  12. selector:
  13. matchLabels:
  14. {{- include "opentelemetry-collector.selectorLabels" . | nindent 6 }}
  15. {{- include "opentelemetry-collector.component" . | nindent 6 }}
  16. podMetricsEndpoints:
  17. {{- toYaml .Values.podMonitor.metricsEndpoints | nindent 2 }}
  18. {{- end }}