jenkins-controller-podmonitor.yaml 1.1 KB

123456789101112131415161718192021222324252627282930
  1. {{- if .Values.controller.googlePodMonitor.enabled }}
  2. apiVersion: monitoring.googleapis.com/v1
  3. kind: PodMonitoring
  4. metadata:
  5. name: {{ template "jenkins.fullname" . }}
  6. {{- if .Values.controller.googlePodMonitor.serviceMonitorNamespace }}
  7. namespace: {{ .Values.controller.googlePodMonitor.serviceMonitorNamespace }}
  8. {{- else }}
  9. namespace: {{ template "jenkins.namespace" . }}
  10. {{- end }}
  11. labels:
  12. "app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
  13. {{- if .Values.renderHelmLabels }}
  14. "helm.sh/chart": "{{ template "jenkins.label" .}}"
  15. {{- end }}
  16. "app.kubernetes.io/managed-by": "{{ .Release.Service }}"
  17. "app.kubernetes.io/instance": "{{ .Release.Name }}"
  18. "app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
  19. spec:
  20. endpoints:
  21. - interval: {{ .Values.controller.googlePodMonitor.scrapeInterval }}
  22. port: http
  23. path: {{ .Values.controller.jenkinsUriPrefix }}{{ .Values.controller.googlePodMonitor.scrapeEndpoint }}
  24. selector:
  25. matchLabels:
  26. "app.kubernetes.io/instance": "{{ .Release.Name }}"
  27. "app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
  28. {{- end }}