mirror of https://git.rancher.io/charts
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
{{- if .Values.serviceMonitor }}{{- if .Values.serviceMonitor.enabled }}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: {{ template "pushprox.serviceMonitor.name" . }}
|
|
namespace: {{ template "pushprox.namespace" . }}
|
|
labels: {{ include "pushProxy.serviceMonitor.labels" . | nindent 4 }}
|
|
spec:
|
|
endpoints: {{include "pushProxy.serviceMonitor.endpoints" . | nindent 4 }}
|
|
jobLabel: component
|
|
podTargetLabels:
|
|
- component
|
|
- pushprox-exporter
|
|
namespaceSelector:
|
|
matchNames:
|
|
- {{ template "pushprox.namespace" . }}
|
|
selector:
|
|
matchLabels: {{ include "pushProxy.client.labels" . | nindent 6 }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "pushProxy.client.name" . }}
|
|
namespace: {{ template "pushprox.namespace" . }}
|
|
labels: {{ include "pushProxy.client.labels" . | nindent 4 }}
|
|
spec:
|
|
ports:
|
|
- name: metrics
|
|
port: {{ required "Need .Values.metricsPort to configure client to listen to metrics at port" .Values.metricsPort}}
|
|
protocol: TCP
|
|
targetPort: {{ .Values.metricsPort }}
|
|
selector: {{ include "pushProxy.client.labels" . | nindent 4 }}
|
|
{{- end }}{{- end }} |