From 1cace2671125ed77c98c923f3ba0e064e9513f04 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Tue, 6 Jul 2021 09:15:31 -0700 Subject: [PATCH] (dev-v2.6-archive) Add rewrite rule to Prometheus and Grafana for /k8s/clusters (partially cherry picked from commit b93fe34e571f1a4c3569b1ef3478625a3e7ff58e) --- .../generated-changes/overlay/templates/nginx-config.yaml | 3 +++ .../overlay/templates/prometheus/nginx-config.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/rancher-grafana/generated-changes/overlay/templates/nginx-config.yaml b/packages/rancher-grafana/generated-changes/overlay/templates/nginx-config.yaml index f847c51ce..78da96fff 100644 --- a/packages/rancher-grafana/generated-changes/overlay/templates/nginx-config.yaml +++ b/packages/rancher-grafana/generated-changes/overlay/templates/nginx-config.yaml @@ -70,6 +70,9 @@ data: if ($request_filename ~ .*\.(?:js|css|jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$) { expires 90d; } + + rewrite ^/k8s/clusters/.*/proxy(.*) /$1 break; + } } } diff --git a/packages/rancher-monitoring/generated-changes/overlay/templates/prometheus/nginx-config.yaml b/packages/rancher-monitoring/generated-changes/overlay/templates/prometheus/nginx-config.yaml index 3f346ca4c..7f5ef368a 100644 --- a/packages/rancher-monitoring/generated-changes/overlay/templates/prometheus/nginx-config.yaml +++ b/packages/rancher-monitoring/generated-changes/overlay/templates/prometheus/nginx-config.yaml @@ -61,6 +61,9 @@ data: if ($request_filename ~ .*\.(?:js|css|jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$) { expires 90d; } + + rewrite ^/k8s/clusters/.*/proxy(.*) /$1 break; + } } }