Skip to content

Commit

Permalink
[kube-prometheus-stack] Thanos Ruler: Support omit externalPrefix wit…
Browse files Browse the repository at this point in the history
…h externalPrefixNilUsesHelmValues=true, if ingress is enabled

Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke committed Apr 15, 2024
1 parent 353e368 commit 420df22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 58.1.1
version: 58.1.2
appVersion: v0.73.1
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ spec:
listenLocal: {{ .Values.thanosRuler.thanosRulerSpec.listenLocal }}
serviceAccountName: {{ template "kube-prometheus-stack.thanosRuler.serviceAccountName" . }}
{{- if .Values.thanosRuler.thanosRulerSpec.externalPrefix }}
externalPrefix: "{{ tpl .Values.thanosRuler.thanosRulerSpec.externalPrefix . }}"
externalPrefix: {{ tpl .Values.thanosRuler.thanosRulerSpec.externalPrefix . | quote }}
{{- else if .Values.thanosRuler.thanosRulerSpec.externalPrefixNilUsesHelmValues }}
{{- /** If externalPrefix is empty and externalPrefixNilUsesHelmValues=true, omit externalPrefix **/}}
{{- else if and .Values.thanosRuler.ingress.enabled .Values.thanosRuler.ingress.hosts }}
externalPrefix: "http://{{ tpl (index .Values.thanosRuler.ingress.hosts 0) . }}{{ .Values.thanosRuler.thanosRulerSpec.routePrefix }}"
{{- else if .Values.thanosRuler.thanosRulerSpec.externalPrefixNilUsesHelmValues }}
{{- else }}
externalPrefix: "http://{{ template "kube-prometheus-stack.thanosRuler.name" . }}.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.thanosRuler.service.port }}"
{{- end }}
{{- if .Values.thanosRuler.thanosRulerSpec.additionalArgs }}
Expand Down

0 comments on commit 420df22

Please sign in to comment.