diff --git a/stable/minio/Chart.yaml b/stable/minio/Chart.yaml index 07a7cfb4e7..0849d020be 100755 --- a/stable/minio/Chart.yaml +++ b/stable/minio/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: MinIO is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. name: minio -version: 2.4.18 +version: 2.5.0 appVersion: RELEASE.2019-05-14T23-57-45Z keywords: - storage diff --git a/stable/minio/README.md b/stable/minio/README.md index 0f8ae9eb85..42f4e23626 100755 --- a/stable/minio/README.md +++ b/stable/minio/README.md @@ -160,6 +160,11 @@ The following table lists the configurable parameters of the MinIO chart and the | `nasgateway.enabled` | Use MinIO as a [NAS gateway](https://docs.MinIO.io/docs/minio-gateway-for-nas) | `false` | | `nasgateway.replicas` | Number of NAS gateway instances to be run in parallel on a PV | `4` | | `environment` | Set MinIO server relevant environment variables in `values.yaml` file. MinIO containers will be passed these variables when they start. | `MINIO_BROWSER: "on"` | +| `metrics.serviceMonitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false` | +| `metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` | +| `metrics.serviceMonitor.namespace` | Optional namespace in which to create ServiceMonitor | `nil` | +| `metrics.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` | +| `metrics.serviceMonitor.scrapeTimeout` | Scrape timeout. If not set, the Prometheus default scrape timeout is used | `nil` | Some of the parameters above map to the env variables defined in the [MinIO DockerHub image](https://hub.docker.com/r/minio/minio/). diff --git a/stable/minio/templates/servicemonitor.yaml b/stable/minio/templates/servicemonitor.yaml new file mode 100644 index 0000000000..2ebea11cae --- /dev/null +++ b/stable/minio/templates/servicemonitor.yaml @@ -0,0 +1,34 @@ +{{- 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: + - port: service + path: /minio/prometheus/metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + selector: + matchLabels: + app: {{ include "minio.name" . }} + release: {{ .Release.Name }} +{{- end }} diff --git a/stable/minio/values.yaml b/stable/minio/values.yaml index 2f6d6f0397..82a45f5ac8 100755 --- a/stable/minio/values.yaml +++ b/stable/minio/values.yaml @@ -257,3 +257,12 @@ serviceAccount: ## 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: + # Metrics can not be disabled yet: https://github.com/minio/minio/issues/7493 + serviceMonitor: + enabled: false + additionalLabels: {} + # namespace: monitoring + # interval: 30s + # scrapeTimeout: 10s