012aaadacc
A new release is added to the cluster: Name: metrics-server Namespace: kube-system Version: 3.11.0 Chart: metrics-server/metrics-server
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
{{- if and .Values.serviceMonitor.enabled .Values.metrics.enabled -}}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: {{ include "metrics-server.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "metrics-server.labels" . | nindent 4 }}
|
|
{{- with .Values.serviceMonitor.additionalLabels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
jobLabel: {{ .Release.Name }}
|
|
namespaceSelector:
|
|
matchNames:
|
|
- {{ .Release.Namespace }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "metrics-server.selectorLabels" . | nindent 6 }}
|
|
endpoints:
|
|
- port: https
|
|
path: /metrics
|
|
scheme: https
|
|
tlsConfig:
|
|
insecureSkipVerify: true
|
|
{{- with .Values.serviceMonitor.interval }}
|
|
interval: {{ . }}
|
|
{{- end }}
|
|
{{- with .Values.serviceMonitor.scrapeTimeout }}
|
|
scrapeTimeout: {{ . }}
|
|
{{- end }}
|
|
{{- with .Values.serviceMonitor.metricRelabelings }}
|
|
metricRelabelings:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.serviceMonitor.relabelings }}
|
|
relabelings:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end -}}
|