From 452f7b00c8e3ed447b297842070a9a006f7d4f93 Mon Sep 17 00:00:00 2001 From: msadiq058 <42430865+msadiq058@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:19:25 +0530 Subject: [PATCH] [kube-prometheus-stack] quote host in alertmanager ingress spec (#4138) * quote host in kube-prometheus-stack alertmanager ingress spec Signed-off-by: Mohd Sadiq * added values yaml in ci Signed-off-by: Mohd Sadiq * add new line in config file Signed-off-by: Mohd Sadiq --------- Signed-off-by: Mohd Sadiq --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../05-alertmanager-ingress-host-with-wildcard-values.yaml | 5 +++++ .../templates/alertmanager/ingress.yaml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 charts/kube-prometheus-stack/ci/05-alertmanager-ingress-host-with-wildcard-values.yaml diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 0e65e6144e2a..84ac3e8e21d3 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -21,7 +21,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 55.7.0 +version: 55.7.1 appVersion: v0.70.0 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/ci/05-alertmanager-ingress-host-with-wildcard-values.yaml b/charts/kube-prometheus-stack/ci/05-alertmanager-ingress-host-with-wildcard-values.yaml new file mode 100644 index 000000000000..22ddcc8b7bb6 --- /dev/null +++ b/charts/kube-prometheus-stack/ci/05-alertmanager-ingress-host-with-wildcard-values.yaml @@ -0,0 +1,5 @@ +alertmanager: + ingress: + enabled: true + hosts: + - "*.test.com" diff --git a/charts/kube-prometheus-stack/templates/alertmanager/ingress.yaml b/charts/kube-prometheus-stack/templates/alertmanager/ingress.yaml index ae8092dec508..201a69ec6fc8 100644 --- a/charts/kube-prometheus-stack/templates/alertmanager/ingress.yaml +++ b/charts/kube-prometheus-stack/templates/alertmanager/ingress.yaml @@ -31,7 +31,7 @@ spec: rules: {{- if .Values.alertmanager.ingress.hosts }} {{- range $host := .Values.alertmanager.ingress.hosts }} - - host: {{ tpl $host $ }} + - host: {{ tpl $host $ | quote }} http: paths: {{- range $p := $paths }}