[bitnami/minio] add prometheus rule (#10298)

* minio add prometheus rule

Signed-off-by: lusson <lusson@foxmail.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* update code style

Signed-off-by: lusson <lusson@foxmail.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
咸鱼老罗
2022-05-25 17:54:12 +08:00
committed by GitHub
parent e5fd57e960
commit bb0988ae3d
4 changed files with 95 additions and 44 deletions

View File

@@ -25,4 +25,4 @@ name: minio
sources:
- https://github.com/bitnami/bitnami-docker-minio
- https://min.io
version: 11.5.5
version: 11.6.0

View File

@@ -77,34 +77,34 @@ The command removes all the Kubernetes components associated with the chart and
### MinIO&reg; parameters
| Name | Description | Value |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| `image.registry` | MinIO&reg; image registry | `docker.io` |
| `image.repository` | MinIO&reg; image repository | `bitnami/minio` |
| `image.tag` | MinIO&reg; image tag (immutable tags are recommended) | `2022.5.8-debian-10-r7` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
| `image.debug` | Specify if debug logs should be enabled | `false` |
| `clientImage.registry` | MinIO&reg; Client image registry | `docker.io` |
| `clientImage.repository` | MinIO&reg; Client image repository | `bitnami/minio-client` |
| `clientImage.tag` | MinIO&reg; Client image tag (immutable tags are recommended) | `2022.5.9-debian-10-r7` |
| `mode` | MinIO&reg; server mode (`standalone` or `distributed`) | `standalone` |
| `auth.rootUser` | MinIO&reg; root username | `admin` |
| `auth.rootPassword` | Password for MinIO&reg; root user | `""` |
| `auth.existingSecret` | Use existing secret for credentials details (`auth.rootUser` and `auth.rootPassword` will be ignored and picked up from this secret). The secret has to contain the keys `root-user` and `root-password`) | `""` |
| `auth.forcePassword` | Force users to specify required passwords | `false` |
| `auth.useCredentialsFiles` | Mount credentials as a files instead of using an environment variable | `false` |
| `auth.forceNewKeys` | Force root credentials (user and password) to be reconfigured every time they change in the secrets | `false` |
| `defaultBuckets` | Comma, semi-colon or space separated list of buckets to create at initialization (only in standalone mode) | `""` |
| `disableWebUI` | Disable MinIO&reg; Web UI | `false` |
| `tls.enabled` | Enable tls in front of the container | `false` |
| `tls.existingSecret` | Name of an existing secret holding the certificate information | `""` |
| `tls.mountPath` | The mount path where the secret will be located | `""` |
| `extraEnvVars` | Extra environment variables to be set on MinIO&reg; container | `{}` |
| `extraEnvVarsCM` | ConfigMap with extra environment variables | `""` |
| `extraEnvVarsSecret` | Secret with extra environment variables | `""` |
| `command` | Default container command (useful when using custom images). Use array form | `[]` |
| `args` | Default container args (useful when using custom images). Use array form | `[]` |
| Name | Description | Value |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| `image.registry` | MinIO&reg; image registry | `docker.io` |
| `image.repository` | MinIO&reg; image repository | `bitnami/minio` |
| `image.tag` | MinIO&reg; image tag (immutable tags are recommended) | `2022.5.23-debian-10-r0` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
| `image.debug` | Specify if debug logs should be enabled | `false` |
| `clientImage.registry` | MinIO&reg; Client image registry | `docker.io` |
| `clientImage.repository` | MinIO&reg; Client image repository | `bitnami/minio-client` |
| `clientImage.tag` | MinIO&reg; Client image tag (immutable tags are recommended) | `2022.5.9-debian-10-r13` |
| `mode` | MinIO&reg; server mode (`standalone` or `distributed`) | `standalone` |
| `auth.rootUser` | MinIO&reg; root username | `admin` |
| `auth.rootPassword` | Password for MinIO&reg; root user | `""` |
| `auth.existingSecret` | Use existing secret for credentials details (`auth.rootUser` and `auth.rootPassword` will be ignored and picked up from this secret). The secret has to contain the keys `root-user` and `root-password`) | `""` |
| `auth.forcePassword` | Force users to specify required passwords | `false` |
| `auth.useCredentialsFiles` | Mount credentials as a files instead of using an environment variable | `false` |
| `auth.forceNewKeys` | Force root credentials (user and password) to be reconfigured every time they change in the secrets | `false` |
| `defaultBuckets` | Comma, semi-colon or space separated list of buckets to create at initialization (only in standalone mode) | `""` |
| `disableWebUI` | Disable MinIO&reg; Web UI | `false` |
| `tls.enabled` | Enable tls in front of the container | `false` |
| `tls.existingSecret` | Name of an existing secret holding the certificate information | `""` |
| `tls.mountPath` | The mount path where the secret will be located | `""` |
| `extraEnvVars` | Extra environment variables to be set on MinIO&reg; container | `{}` |
| `extraEnvVarsCM` | ConfigMap with extra environment variables | `""` |
| `extraEnvVarsSecret` | Secret with extra environment variables | `""` |
| `command` | Default container command (useful when using custom images). Use array form | `[]` |
| `args` | Default container args (useful when using custom images). Use array form | `[]` |
### MinIO&reg; deployment/statefulset parameters
@@ -252,7 +252,7 @@ The command removes all the Kubernetes components associated with the chart and
| `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup` | `false` |
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
| `volumePermissions.image.repository` | Init container volume-permissions image repository | `bitnami/bitnami-shell` |
| `volumePermissions.image.tag` | Init container volume-permissions image tag (immutable tags are recommended) | `10-debian-10-r427` |
| `volumePermissions.image.tag` | Init container volume-permissions image tag (immutable tags are recommended) | `10-debian-10-r433` |
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` |
| `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
| `volumePermissions.resources.limits` | Init container volume-permissions resource limits | `{}` |
@@ -281,20 +281,24 @@ The command removes all the Kubernetes components associated with the chart and
### Metrics parameters
| Name | Description | Value |
| ------------------------------------------ | ------------------------------------------------------------------------------------------- | --------------------------- |
| `metrics.prometheusAuthType` | Authentication mode for Prometheus (`jwt` or `public`) | `public` |
| `metrics.serviceMonitor.enabled` | If the operator is installed in your cluster, set to true to create a Service Monitor Entry | `false` |
| `metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `""` |
| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in Prometheus | `""` |
| `metrics.serviceMonitor.path` | HTTP path to scrape for metrics | `/minio/v2/metrics/cluster` |
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `""` |
| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
| `metrics.serviceMonitor.relabelings` | Metrics relabelings to add to the scrape endpoint, applied before scraping | `[]` |
| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
| Name | Description | Value |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| `metrics.prometheusAuthType` | Authentication mode for Prometheus (`jwt` or `public`) | `public` |
| `metrics.serviceMonitor.enabled` | If the operator is installed in your cluster, set to true to create a Service Monitor Entry | `false` |
| `metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `""` |
| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in Prometheus | `""` |
| `metrics.serviceMonitor.path` | HTTP path to scrape for metrics | `/minio/v2/metrics/cluster` |
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `""` |
| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
| `metrics.serviceMonitor.relabelings` | Metrics relabelings to add to the scrape endpoint, applied before scraping | `[]` |
| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
| `metrics.prometheusRule.enabled` | Create a Prometheus Operator PrometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`) | `false` |
| `metrics.prometheusRule.namespace` | Namespace for the PrometheusRule Resource (defaults to the Release Namespace) | `""` |
| `metrics.prometheusRule.additionalLabels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` |
| `metrics.prometheusRule.rules` | Prometheus Rule definitions | `[]` |
### Gateway parameters

View File

@@ -0,0 +1,22 @@
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: metrics
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.metrics.prometheusRule.additionalLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
groups:
- name: {{ include "common.names.fullname" . }}
rules: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 6 }}
{{- end }}

View File

@@ -994,6 +994,31 @@ metrics:
## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
##
selector: {}
## Prometheus Operator PrometheusRule configuration
##
prometheusRule:
## @param metrics.prometheusRule.enabled Create a Prometheus Operator PrometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`)
##
enabled: false
## @param metrics.prometheusRule.namespace Namespace for the PrometheusRule Resource (defaults to the Release Namespace)
##
namespace: ""
## @param metrics.prometheusRule.additionalLabels Additional labels that can be used so PrometheusRule will be discovered by Prometheus
##
additionalLabels: {}
## @param metrics.prometheusRule.rules Prometheus Rule definitions
# - alert: minio cluster nodes offline
# annotations:
# summary: "minio cluster nodes offline"
# description: "minio cluster nodes offlinepod {{`{{`}} $labels.pod {{`}}`}} service {{`{{`}} $labels.job {{`}}`}} offline"
# for: 10m
# expr: minio_cluster_nodes_offline_total > 0
# labels:
# severity: critical
# group: PaaS
##
rules: []
## @section Gateway parameters