chart: added possibility to override ServiceMonitor apiVersion

Signed-off-by: Dmytro Bondar <git@bonddim.com>
This commit is contained in:
Dmytro Bondar 2024-12-10 13:09:40 +01:00
parent c6a2d9afb3
commit 6ad28dd5ef
No known key found for this signature in database
GPG key ID: C123CD37BBED8BB7
3 changed files with 5 additions and 1 deletions

View file

@ -398,6 +398,7 @@ metadata:
| controller.metrics.service.type | string | `"ClusterIP"` | |
| controller.metrics.serviceMonitor.additionalLabels | object | `{}` | |
| controller.metrics.serviceMonitor.annotations | object | `{}` | Annotations to be added to the ServiceMonitor. |
| controller.metrics.serviceMonitor.apiVersion | string | `"monitoring.coreos.com/v1"` | Override API version of the ServiceMonitor resource. E.g. `azmonitoring.coreos.com/v1` for Azure Managed Prometheus |
| controller.metrics.serviceMonitor.enabled | bool | `false` | |
| controller.metrics.serviceMonitor.labelLimit | int | `0` | Per-scrape limit on number of labels that will be accepted for a sample. |
| controller.metrics.serviceMonitor.labelNameLengthLimit | int | `0` | Per-scrape limit on length of labels name that will be accepted for a sample. |

View file

@ -1,5 +1,5 @@
{{- if and .Values.controller.metrics.enabled .Values.controller.metrics.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
apiVersion: {{ .Values.controller.metrics.serviceMonitor.apiVersion }}
kind: ServiceMonitor
metadata:
name: {{ include "ingress-nginx.controller.fullname" . }}

View file

@ -874,6 +874,9 @@ controller:
# nodePort: ""
serviceMonitor:
enabled: false
# -- Override API version of the ServiceMonitor resource.
# E.g. `azmonitoring.coreos.com/v1` for Azure Managed Prometheus
apiVersion: monitoring.coreos.com/v1
additionalLabels: {}
# -- Annotations to be added to the ServiceMonitor.
annotations: {}