Skip to content

Commit

Permalink
ServiceMonitor: Prefer read-only api-key (#221)
Browse files Browse the repository at this point in the history
When both `apiKey` and `readOnlyApiKey` are `true`, prefer the
read-only key as it is sufficient for scraping the metrics.

Fixes #219
  • Loading branch information
arthurk authored Aug 30, 2024
1 parent 66a2597 commit 6d2d7cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions charts/qdrant/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ spec:
relabelings:
{{ tpl (toYaml .Values.metrics.serviceMonitor.relabelings | indent 8) . }}
{{- end }}
{{- if .Values.apiKey }}
{{- if .Values.readOnlyApiKey }}
authorization:
type: Bearer
credentials:
name: {{ include "qdrant.fullname" . }}-apikey
key: api-key
{{- else if .Values.readOnlyApiKey }}
key: read-only-api-key
{{- else if .Values.apiKey }}
authorization:
type: Bearer
credentials:
name: {{ include "qdrant.fullname" . }}-apikey
key: read-only-api-key
key: api-key
{{- end }}
selector:
matchLabels:
Expand Down

0 comments on commit 6d2d7cc

Please sign in to comment.