added repo
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
{{- if and .Values.prometheus.metricServer.enabled .Values.prometheus.metricServer.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ .Values.operator.name }}-metrics-apiserver
|
||||
{{- with .Values.additionalAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Values.operator.name }}
|
||||
{{- include "keda.labels" . | indent 4 }}
|
||||
{{- range $key, $value := .Values.prometheus.metricServer.serviceMonitor.additionalLabels }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.namespace }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.jobLabel }}
|
||||
jobLabel: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.targetLabels }}
|
||||
targetLabels:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.podTargetLabels }}
|
||||
podTargetLabels:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
endpoints:
|
||||
- port: {{ .Values.prometheus.metricServer.portName }}
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.targetPort }}
|
||||
targetPort: {{ . }}
|
||||
{{- end }}
|
||||
path: /metrics
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.interval }}
|
||||
interval: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ . }}
|
||||
{{- end }}
|
||||
{{- if .Values.prometheus.metricServer.serviceMonitor.relabelings}}
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.relabelings }}
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.relabellings }}
|
||||
relabelings:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end}}
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
scheme: {{ .Values.prometheus.metricServer.serviceMonitor.scheme }}
|
||||
{{- with .Values.prometheus.metricServer.serviceMonitor.tlsConfig }}
|
||||
tlsConfig:
|
||||
{{ toYaml . | nindent 6}}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ .Values.operator.name }}-metrics-apiserver
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user