Skip to content

Commit

Permalink
[kube-prometheus-stack] Issue #333 (#334)
Browse files Browse the repository at this point in the history
* #333 - allow additional templating within values.yaml file

Signed-off-by: Ryan Dyer <ryan-dyer-sp@users.noreply.github.com>

* match tpl+toyaml+indent ordering

Signed-off-by: Ryan Dyer <ryan-dyer-sp@users.noreply.github.com>
  • Loading branch information
ryan-dyer-sp authored Nov 16, 2020
1 parent 0103b5a commit bc69581
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 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 @@ -17,7 +17,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 11.1.5
version: 11.1.6
appVersion: 0.43.2
tillerVersion: ">=2.12.0"
kubeVersion: ">=1.16.0-0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
{{- if .Values.alertmanager.alertmanagerSpec.externalUrl }}
externalUrl: "{{ .Values.alertmanager.alertmanagerSpec.externalUrl }}"
{{- else if and .Values.alertmanager.ingress.enabled .Values.alertmanager.ingress.hosts }}
externalUrl: "http://{{ index .Values.alertmanager.ingress.hosts 0 }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}"
externalUrl: "http://{{ tpl (index .Values.alertmanager.ingress.hosts 0) . }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}"
{{- else }}
externalUrl: http://{{ template "kube-prometheus-stack.fullname" . }}-alertmanager.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.alertmanager.service.port }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ metadata:
app: {{ template "kube-prometheus-stack.name" . }}-prometheus-scrape-confg
{{ include "kube-prometheus-stack.labels" . | indent 4 }}
data:
additional-scrape-configs.yaml: {{ toYaml .Values.prometheus.prometheusSpec.additionalScrapeConfigs | b64enc | quote }}
additional-scrape-configs.yaml: {{ tpl (toYaml .Values.prometheus.prometheusSpec.additionalScrapeConfigs) $ | b64enc | quote }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ spec:
{{- end -}}
{{- if .Values.prometheus.ingress.tls }}
tls:
{{ toYaml .Values.prometheus.ingress.tls | indent 4 }}
{{ tpl (toYaml .Values.prometheus.ingress.tls | indent 4) . }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ spec:
{{- end }}
{{- if .Values.prometheus.prometheusSpec.podMetadata }}
podMetadata:
{{ toYaml .Values.prometheus.prometheusSpec.podMetadata | indent 4 }}
{{ tpl (toYaml .Values.prometheus.prometheusSpec.podMetadata | indent 4) . }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.query }}
query:
Expand Down

0 comments on commit bc69581

Please sign in to comment.