Skip to content

Commit b94a1a5

Browse files
authoredNov 13, 2023
[bitnami/minio] feat: Support multiple paths for metrics (fixes #19573) (#20910)
* [bitnami/minio] feat: Support multiple paths for metrics (fixes #19573) Signed-off-by: Abbas Babaei <abbasbabaei76@gmail.com> * [bitnami/minio] fix: missing ends Signed-off-by: Abbas Babaei <abbasbabaei76@gmail.com> --------- Signed-off-by: Abbas Babaei <abbasbabaei76@gmail.com>
1 parent 860eb62 commit b94a1a5

File tree

4 files changed

+42
-25
lines changed

4 files changed

+42
-25
lines changed
 

‎bitnami/minio/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ maintainers:
3434
name: minio
3535
sources:
3636
- https://github.com/bitnami/charts/tree/main/bitnami/minio
37-
version: 12.9.4
37+
version: 12.10.0

‎bitnami/minio/README.md

+21-21
Original file line numberDiff line numberDiff line change
@@ -298,26 +298,26 @@ The command removes all the Kubernetes components associated with the chart and
298298

299299
### Metrics parameters
300300

301-
| Name | Description | Value |
302-
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
303-
| `metrics.prometheusAuthType` | Authentication mode for Prometheus (`jwt` or `public`) | `public` |
304-
| `metrics.serviceMonitor.enabled` | If the operator is installed in your cluster, set to true to create a Service Monitor Entry | `false` |
305-
| `metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `""` |
306-
| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
307-
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in Prometheus | `""` |
308-
| `metrics.serviceMonitor.path` | HTTP path to scrape for metrics | `/minio/v2/metrics/cluster` |
309-
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
310-
| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `""` |
311-
| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
312-
| `metrics.serviceMonitor.relabelings` | Metrics relabelings to add to the scrape endpoint, applied before scraping | `[]` |
313-
| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
314-
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
315-
| `metrics.serviceMonitor.apiVersion` | ApiVersion for the serviceMonitor Resource (defaults to "monitoring.coreos.com/v1") | `""` |
316-
| `metrics.serviceMonitor.tlsConfig` | Additional TLS configuration for metrics endpoint with "https" scheme | `{}` |
317-
| `metrics.prometheusRule.enabled` | Create a Prometheus Operator PrometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`) | `false` |
318-
| `metrics.prometheusRule.namespace` | Namespace for the PrometheusRule Resource (defaults to the Release Namespace) | `""` |
319-
| `metrics.prometheusRule.additionalLabels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` |
320-
| `metrics.prometheusRule.rules` | Prometheus Rule definitions | `[]` |
301+
| Name | Description | Value |
302+
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
303+
| `metrics.prometheusAuthType` | Authentication mode for Prometheus (`jwt` or `public`) | `public` |
304+
| `metrics.serviceMonitor.enabled` | If the operator is installed in your cluster, set to true to create a Service Monitor Entry | `false` |
305+
| `metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `""` |
306+
| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
307+
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in Prometheus | `""` |
308+
| `metrics.serviceMonitor.paths` | HTTP paths to scrape for metrics | `["/minio/v2/metrics/cluster","/minio/v2/metrics/node"]` |
309+
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
310+
| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `""` |
311+
| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
312+
| `metrics.serviceMonitor.relabelings` | Metrics relabelings to add to the scrape endpoint, applied before scraping | `[]` |
313+
| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
314+
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
315+
| `metrics.serviceMonitor.apiVersion` | ApiVersion for the serviceMonitor Resource (defaults to "monitoring.coreos.com/v1") | `""` |
316+
| `metrics.serviceMonitor.tlsConfig` | Additional TLS configuration for metrics endpoint with "https" scheme | `{}` |
317+
| `metrics.prometheusRule.enabled` | Create a Prometheus Operator PrometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`) | `false` |
318+
| `metrics.prometheusRule.namespace` | Namespace for the PrometheusRule Resource (defaults to the Release Namespace) | `""` |
319+
| `metrics.prometheusRule.additionalLabels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` |
320+
| `metrics.prometheusRule.rules` | Prometheus Rule definitions | `[]` |
321321

322322
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
323323

@@ -542,4 +542,4 @@ Unless required by applicable law or agreed to in writing, software
542542
distributed under the License is distributed on an "AS IS" BASIS,
543543
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
544544
See the License for the specific language governing permissions and
545-
limitations under the License.
545+
limitations under the License.

‎bitnami/minio/templates/servicemonitor.yaml

+13-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,18 @@ metadata:
1616
{{- end }}
1717
spec:
1818
endpoints:
19+
{{- /* Backward Compatibility for .Values.metrics.serviceMonitor.path */}}
20+
{{- $paths := list }}
21+
{{- if (.Values.metrics.serviceMonitor.paths | empty | not) }}
22+
{{- $paths = .Values.metrics.serviceMonitor.paths }}
23+
{{- end }}
24+
{{- if (.Values.metrics.serviceMonitor.path | empty | not) }}
25+
{{- $paths = prepend $paths .Values.metrics.serviceMonitor.path }}
26+
{{- end }}
27+
{{- range $idx, $path := ($paths | uniq) }}
28+
{{- with $ }}
1929
- port: minio-api
20-
path: {{ .Values.metrics.serviceMonitor.path }}
30+
path: {{ $path }}
2131
{{- if .Values.metrics.serviceMonitor.interval }}
2232
interval: {{ .Values.metrics.serviceMonitor.interval }}
2333
{{- end }}
@@ -39,6 +49,8 @@ spec:
3949
{{- if .Values.metrics.serviceMonitor.tlsConfig }}
4050
tlsConfig: {{- toYaml .Values.metrics.serviceMonitor.tlsConfig | nindent 8 }}
4151
{{- end }}
52+
{{- end }}
53+
{{- end }}
4254
{{- if .Values.metrics.serviceMonitor.jobLabel }}
4355
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }}
4456
{{- end }}

‎bitnami/minio/values.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1062,9 +1062,14 @@ metrics:
10621062
## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in Prometheus
10631063
##
10641064
jobLabel: ""
1065-
## @param metrics.serviceMonitor.path HTTP path to scrape for metrics
1065+
## DEPRECATED metrics.serviceMonitor.path - please use `metrics.serviceMonitor.paths` instead
10661066
##
1067-
path: /minio/v2/metrics/cluster
1067+
## path: /minio/v2/metrics/cluster
1068+
## @param metrics.serviceMonitor.paths HTTP paths to scrape for metrics
1069+
##
1070+
paths:
1071+
- /minio/v2/metrics/cluster
1072+
- /minio/v2/metrics/node
10681073
## @param metrics.serviceMonitor.interval Interval at which metrics should be scraped
10691074
##
10701075
interval: 30s

0 commit comments

Comments
 (0)
Please sign in to comment.