From a55c95ef54995672d0372f19ad63cfd8ee9beff7 Mon Sep 17 00:00:00 2001 From: juan131 Date: Tue, 30 Apr 2019 14:04:54 +0200 Subject: [PATCH] Add instructions to add Prometheus exporter annotations Signed-off-by: juan131 --- bitnami/minio/README.md | 16 ++++++++++++++++ bitnami/minio/templates/statefulset.yaml | 2 +- bitnami/minio/values-production.yaml | 5 ++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/bitnami/minio/README.md b/bitnami/minio/README.md index a47a2a5bc..1e09564fa 100644 --- a/bitnami/minio/README.md +++ b/bitnami/minio/README.md @@ -147,6 +147,22 @@ $ helm install --name my-release bitnami/minio --set mode=distributed --set stat > Note: that the number of replicas must even, greater than 4 and lower than 32 +## Prometheus exporter + +MinIO exports Prometheus metrics at `/minio/prometheus/metrics`. To allow Prometheus collecting your MinIO metrics, modify the `values.yaml` adding the corresponding annotations: + +```diff +service: + ... +- annotations: {} ++ annotations: ++ prometheus.io/scrape: "true" ++ prometheus.io/path: "/minio/prometheus/metrics" ++ prometheus.io/port: "9000" +``` + +> Find more information about MinIO metrics at https://docs.min.io/docs/how-to-monitor-minio-using-prometheus.html + ## Production settings The [values-production.yaml](values-production.yaml) file consists a configuration to deploy a high-available MinIO deployment distributed mode for production environments. We recommend that you base your production configuration on this template and adjust the parameters appropriately. diff --git a/bitnami/minio/templates/statefulset.yaml b/bitnami/minio/templates/statefulset.yaml index 8ef350e67..a8fb4e589 100644 --- a/bitnami/minio/templates/statefulset.yaml +++ b/bitnami/minio/templates/statefulset.yaml @@ -17,7 +17,7 @@ spec: app.kubernetes.io/instance: {{ .Release.Name }} serviceName: {{ include "minio.fullname" . }}-headless replicas: {{ .Values.statefulset.replicaCount }} - podManagementPolicy: {{ .Values.statefulset.podManagementPolicy | quote }} + podManagementPolicy: {{ .Values.statefulset.podManagementPolicy }} updateStrategy: type: {{ .Values.statefulset.updateStrategy }} {{- if (eq "Recreate" .Values.statefulset.updateStrategy) }} diff --git a/bitnami/minio/values-production.yaml b/bitnami/minio/values-production.yaml index 51eeca29c..41781fe7f 100644 --- a/bitnami/minio/values-production.yaml +++ b/bitnami/minio/values-production.yaml @@ -198,7 +198,10 @@ service: ## set the LoadBalancer service type to internal only. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer ## - annotations: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/path: "/minio/prometheus/metrics" + prometheus.io/port: "9000" ## loadBalancerIP for the PrestaShop Service (optional, cloud specific) ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer