From 1424544ed6b1903b70c5453dce2a0b9a1d4cdde7 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Wed, 8 May 2024 13:15:04 +0200 Subject: [PATCH] feat(observability): add HTTP routes --- kube-prometheus/kustomization.yaml | 1 + .../resources/http_routes.grafana.yaml | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 kube-prometheus/resources/http_routes.grafana.yaml diff --git a/kube-prometheus/kustomization.yaml b/kube-prometheus/kustomization.yaml index 510980f..bb9f63b 100644 --- a/kube-prometheus/kustomization.yaml +++ b/kube-prometheus/kustomization.yaml @@ -7,6 +7,7 @@ resources: - resources/secret.grafana-admin.yaml - resources/secret.auth.yaml - resources/secret.db.yaml + - resources/http_routes.grafana.yaml helmCharts: - name: kube-prometheus-stack diff --git a/kube-prometheus/resources/http_routes.grafana.yaml b/kube-prometheus/resources/http_routes.grafana.yaml new file mode 100644 index 0000000..26380d4 --- /dev/null +++ b/kube-prometheus/resources/http_routes.grafana.yaml @@ -0,0 +1,34 @@ +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: grafana-http +spec: + parentRefs: + - name: contour + sectionName: http + namespace: projectcontour + hostnames: + - grafana.icb4dc0.de + rules: + - filters: + - type: RequestRedirect + requestRedirect: + scheme: https + statusCode: 301 +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: grafana-https +spec: + parentRefs: + - name: contour + sectionName: https + namespace: projectcontour + hostnames: + - grafana.icb4dc0.de + rules: + - backendRefs: + - name: prometheus-grafana + port: 80 \ No newline at end of file