add service monitor support and service account support

This commit is contained in:
Harshavardhana
2021-09-12 11:19:27 -07:00
parent c2f25b6f62
commit 410b8dd0fd
6 changed files with 102 additions and 16 deletions

View File

@@ -1,8 +1,8 @@
apiVersion: v1
description: Multi-Cloud Object Storage
name: minio
version: 3.0.2
appVersion: RELEASE.2021-09-03T03-56-13Z
version: 3.1.0
appVersion: RELEASE.2021-09-09T21-37-07Z
keywords:
- minio
- storage

View File

@@ -0,0 +1,7 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "minio.serviceAccountName" . | quote }}
namespace: {{ .Release.Namespace | quote }}
{{- end -}}

View File

@@ -0,0 +1,41 @@
{{- if .Values.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "minio.fullname" . }}
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
{{- end }}
labels:
app: {{ template "minio.name" . }}
chart: {{ template "minio.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }}
{{- end }}
spec:
endpoints:
{{- if .Values.tls.enabled }}
- port: https
{{ else }}
- port: http
{{- end }}
path: /minio/v2/metrics/cluster
{{- if .Values.metrics.serviceMonitor.interval }}
interval: {{ .Values.metrics.serviceMonitor.interval }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
bearerTokenSecret:
name: {{ template "minio.fullname" . }}-prometheus
key: token
namespaceSelector:
matchNames:
- {{ .Release.Namespace | quote }}
selector:
matchLabels:
app: {{ include "minio.name" . }}
release: {{ .Release.Name }}
{{- end }}

View File

@@ -14,7 +14,7 @@ clusterDomain: cluster.local
##
image:
repository: quay.io/minio/minio
tag: RELEASE.2021-08-31T05-46-54Z
tag: RELEASE.2021-09-09T21-37-07Z
pullPolicy: IfNotPresent
imagePullSecrets: []
@@ -25,7 +25,7 @@ imagePullSecrets: []
##
mcImage:
repository: quay.io/minio/mc
tag: RELEASE.2021-07-27T06-46-19Z
tag: RELEASE.2021-09-02T09-21-27Z
pullPolicy: IfNotPresent
## minio mode, i.e. standalone or distributed or gateway (nas)
@@ -318,3 +318,19 @@ networkPolicy:
podDisruptionBudget:
enabled: false
maxUnavailable: 1
## Specify the service account to use for the Minio pods. If 'create' is set to 'false'
## and 'name' is left unspecified, the account 'default' will be used.
serviceAccount:
create: true
## The name of the service account to use. If 'create' is 'true', a service account with that name
## will be created. Otherwise, a name will be auto-generated.
name:
metrics:
serviceMonitor:
enabled: false
additionalLabels: {}
# namespace: monitoring
# interval: 30s
# scrapeTimeout: 10s