fix: service monitoring labels in helm release (#13238)

fixes #13236
This commit is contained in:
Goncharov Sergey 2021-09-18 07:18:27 +03:00 committed by GitHub
parent 246cbe1312
commit 745782a77a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 1 deletions

View File

@ -1,7 +1,7 @@
apiVersion: v1
description: Multi-Cloud Object Storage
name: minio
version: 3.1.1
version: 3.1.2
appVersion: RELEASE.2021-09-09T21-37-07Z
keywords:
- minio

View File

@ -11,6 +11,7 @@ metadata:
chart: {{ template "minio.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
monitoring: true
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}

View File

@ -28,9 +28,11 @@ spec:
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if not .Values.metrics.serviceMonitor.public }}
bearerTokenSecret:
name: {{ template "minio.fullname" . }}-prometheus
key: token
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace | quote }}
@ -38,4 +40,5 @@ spec:
matchLabels:
app: {{ include "minio.name" . }}
release: {{ .Release.Name }}
monitoring: true
{{- end }}

View File

@ -127,6 +127,10 @@ spec:
secretKeyRef:
name: {{ template "minio.secretName" . }}
key: rootPassword
{{- if .Values.metrics.podMonitor.public }}
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public"
{{- end}}
{{- range $key, $val := .Values.environment }}
- name: {{ $key }}
value: {{ $val | quote }}

View File

@ -331,6 +331,7 @@ metrics:
serviceMonitor:
enabled: false
additionalLabels: {}
public: true
# namespace: monitoring
# interval: 30s
# scrapeTimeout: 10s