mirror of
https://github.com/outbackdingo/qdrant-helm.git
synced 2026-01-27 10:20:18 +00:00
Add custom authorization support for ServiceMonitor (#407)
Add support for custom authorization configuration in ServiceMonitor to allow users to configure authorization when API keys are configured externally. The authorization field in metrics.serviceMonitor takes precedence over automatic API key detection from apiKey and readOnlyApiKey. This change adds: - authorization field to metrics.serviceMonitor in values.yaml - Support for custom authorization in servicemonitor.yaml template - Documentation and example in values.yaml Co-authored-by: DovnarAlexander <dovnaralexander@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,10 @@ spec:
|
||||
relabelings:
|
||||
{{ tpl (toYaml .Values.metrics.serviceMonitor.relabelings | indent 8) . }}
|
||||
{{- end }}
|
||||
{{- if .Values.readOnlyApiKey }}
|
||||
{{- if .Values.metrics.serviceMonitor.authorization }}
|
||||
authorization:
|
||||
{{ tpl (toYaml .Values.metrics.serviceMonitor.authorization | indent 8) . }}
|
||||
{{- else if .Values.readOnlyApiKey }}
|
||||
authorization:
|
||||
type: Bearer
|
||||
credentials:
|
||||
|
||||
@@ -217,6 +217,15 @@ metrics:
|
||||
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig
|
||||
##
|
||||
relabelings: []
|
||||
## Authorization to apply to the metrics endpoint for the cases when the API key(s) are configured externally
|
||||
## ref: https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.SafeAuthorization
|
||||
##
|
||||
authorization: {}
|
||||
# authorization:
|
||||
# type: Bearer
|
||||
# credentials:
|
||||
# name: external-secret-with-api-key
|
||||
# key: api-key
|
||||
|
||||
serviceAccount:
|
||||
annotations: {}
|
||||
|
||||
Reference in New Issue
Block a user