add custom web_root to kiali

pull/550/head
Caleb Bron 2020-08-16 16:54:36 -07:00
parent 2f6a30d92a
commit b76723768c
2 changed files with 61 additions and 2 deletions

View File

@ -67,8 +67,8 @@ kiali:
ingress_enabled: false
external_services:
prometheus:
custom_metrics_url: "http://monitoring-rancher-monitor-prometheus.monitoring-system.svc:9090"
url: "http://monitoring-rancher-monitor-prometheus.monitoring-system.svc:9090"
custom_metrics_url: "http://rancher-monitoring-prometheus.monitoring-system.svc:9090"
url: "http://rancher-monitoring-prometheus.monitoring-system.svc:9090"
tracing:
enabled: false
# TODO : update images

View File

@ -37,3 +37,62 @@ diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-kiali-server/charts-original/C
+ catalog.cattle.io/requires-gvr: prometheuses.monitoring.coreos.com/v1
+ catalog.rancher.io/namespace: cattle-istio-system
+ catalog.rancher.io/release-name: rancher-kiali-server
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-kiali-server/charts-original/templates/deployment.yaml packages/rancher-kiali-server/charts/templates/deployment.yaml
--- packages/rancher-kiali-server/charts-original/templates/deployment.yaml
+++ packages/rancher-kiali-server/charts/templates/deployment.yaml
@@ -89,6 +89,11 @@
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
+ {{- if .Values.web_root_override }}
+ - name: kiali-console
+ subPath: env.js
+ mountPath: /opt/kiali/console/env.js
+ {{- end }}
- name: {{ include "kiali-server.fullname" . }}-configuration
mountPath: "/kiali-configuration"
- name: {{ include "kiali-server.fullname" . }}-cert
@@ -104,6 +109,14 @@
{{- toYaml .Values.deployment.resources | nindent 10 }}
{{- end }}
volumes:
+ {{- if .Values.web_root_override }}
+ - name: kiali-console
+ configMap:
+ name: kiali-console
+ items:
+ - key: env.js
+ path: env.js
+ {{- end }}
- name: {{ include "kiali-server.fullname" . }}-configuration
configMap:
name: {{ include "kiali-server.fullname" . }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-kiali-server/charts-original/templates/web-root-configmap.yaml packages/rancher-kiali-server/charts/templates/web-root-configmap.yaml
--- packages/rancher-kiali-server/charts-original/templates/web-root-configmap.yaml
+++ packages/rancher-kiali-server/charts/templates/web-root-configmap.yaml
@@ -0,0 +1,12 @@
+{{- if .Values.web_root_override }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: kiali-console
+ namespace: {{ .Release.Namespace }}
+ labels:
+ {{- include "kiali-server.labels" . | nindent 4 }}
+data:
+ env.js: |
+ window.WEB_ROOT='/api/v1/namespaces/{{ .Release.Namespace }}/services/http:rancher-istio-kiali:20001/proxy';
+{{- end }}
diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-kiali-server/charts-original/values.yaml packages/rancher-kiali-server/charts/values.yaml
--- packages/rancher-kiali-server/charts-original/values.yaml
+++ packages/rancher-kiali-server/charts/values.yaml
@@ -9,6 +9,9 @@
# do this, a PR would be welcome.
kiali_route_url: ""
+# rancher specific override that allows proxy access to kiali url
+web_root_override: true
+
#
# Settings that mimic the Kiali CR which are placed in the ConfigMap
#