mirror of https://git.rancher.io/charts
Remove two subfilter URL rewriting rules from grafana nginx config
With the switch from AngularJS to ReactJS, grafana is now using /absolute/url style hrefs in its templates and its JavaScript assets, but these URLs are passed directly into React's clientside routing engine rather than hitting the proxy on the backend. Thus, rewriting these URLs is inappropriate, confuses the clientside router, and breaks interlink between several tabs in the UI, and a few dashboards, among other things. Attempts to address #2445pull/2448/head
parent
154e745ead
commit
0abb957377
|
@ -52,7 +52,6 @@ data:
|
|||
|
||||
sub_filter_types application/json;
|
||||
sub_filter_once off;
|
||||
sub_filter '"url":"/d' '"url":"d';
|
||||
}
|
||||
|
||||
location /api/live/ {
|
||||
|
@ -76,7 +75,6 @@ data:
|
|||
|
||||
sub_filter_once off;
|
||||
sub_filter '"appSubUrl":""' '"appSubUrl":"/k8s/clusters/{{ .Values.global.cattle.clusterId }}/api/v1/namespaces/{{ template "grafana.namespace" . }}/services/http:{{ template "grafana.fullname" . }}:{{ .Values.service.port }}/proxy"';
|
||||
sub_filter '"url":"/' '"url":"./';
|
||||
sub_filter ':"/avatar/' ':"avatar/';
|
||||
|
||||
if ($request_filename ~ .*\.(?:js|css|jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$) {
|
||||
|
|
|
@ -33,13 +33,10 @@
|
|||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
@@ -125,6 +154,17 @@
|
||||
{{- print "rbac.authorization.k8s.io/v1" -}}
|
||||
{{- else -}}
|
||||
{{- print "rbac.authorization.k8s.io/v1beta1" -}}
|
||||
+ {{- end -}}
|
||||
+{{- end -}}
|
||||
+
|
||||
@@ -128,6 +157,17 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
+{{/*
|
||||
+Return the appropriate apiVersion for HorizontalPodAutoscaler.
|
||||
+*/}}
|
||||
|
@ -48,6 +45,9 @@
|
|||
+ {{- print "autoscaling/v2" -}}
|
||||
+ {{- else if .Capabilities.APIVersions.Has "autoscaling/v1" }}
|
||||
+ {{- print "autoscaling/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
+ {{- end -}}
|
||||
+{{- end -}}
|
||||
+
|
||||
{{/*
|
||||
Return the appropriate apiVersion for ingress.
|
||||
*/}}
|
||||
|
|
|
@ -23,9 +23,8 @@
|
|||
spec:
|
||||
privileged: false
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -47,5 +42,4 @@
|
||||
- min: 1
|
||||
@@ -48,4 +43,3 @@
|
||||
max: 65535
|
||||
readOnlyRootFilesystem: false
|
||||
-{{- end }}
|
||||
{{- end }}
|
||||
-{{- end }}
|
||||
|
|
|
@ -7,9 +7,8 @@
|
|||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
@@ -27,5 +26,4 @@
|
||||
- projected
|
||||
@@ -28,4 +27,3 @@
|
||||
- csi
|
||||
- secret
|
||||
-{{- end }}
|
||||
{{- end }}
|
||||
-{{- end }}
|
||||
|
|
Loading…
Reference in New Issue