Skip to content

Commit

Permalink
[prometheus] add tpl to ingress
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Jedro <cj@cloudeteer.de>
  • Loading branch information
christianjedroCDT committed Oct 31, 2024
1 parent 97de0c5 commit 549ca35
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/prometheus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: prometheus
appVersion: v2.55.0
version: 25.28.0
version: 25.29.0
kubeVersion: ">=1.19.0-0"
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down
8 changes: 4 additions & 4 deletions charts/prometheus/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ spec:
rules:
{{- range .Values.server.ingress.hosts }}
{{- $url := splitList "/" . }}
- host: {{ first $url }}
- host: {{ tpl (first $url) $ }}
http:
paths:
{{ if $extraPaths }}
{{ toYaml $extraPaths | indent 10 }}
{{ tpl (toYaml $extraPaths | indent 10) $ }}
{{- end }}
- path: {{ $ingressPath }}
- path: {{ tpl ($ingressPath) $ }}
{{- if $ingressSupportsPathType }}
pathType: {{ $ingressPathType }}
{{- end }}
Expand All @@ -52,6 +52,6 @@ spec:
{{- end -}}
{{- if .Values.server.ingress.tls }}
tls:
{{ toYaml .Values.server.ingress.tls | indent 4 }}
{{ tpl (toYaml .Values.server.ingress.tls | indent 4) $ }}
{{- end -}}
{{- end -}}
6 changes: 3 additions & 3 deletions charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ server:
## Redirect ingress to an additional defined port on the service
# servicePort: 8081

## Prometheus server Ingress hostnames with optional path
## Prometheus server Ingress hostnames with optional path (passed through tpl)
## Must be provided if Ingress is enabled
##
hosts: []
Expand All @@ -389,14 +389,14 @@ server:
# pathType is only for k8s >= 1.18
pathType: Prefix

## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
## Extra paths to prepend to every host configuration. This is useful when working with annotation based services. (passed through tpl)
extraPaths: []
# - path: /*
# backend:
# serviceName: ssl-redirect
# servicePort: use-annotation

## Prometheus server Ingress TLS configuration
## Prometheus server Ingress TLS configuration (hosts passed through tpl)
## Secrets must be manually created in the namespace
##
tls: []
Expand Down

0 comments on commit 549ca35

Please sign in to comment.