rancher-charts/packages/rancher-kiali-server/rancher-kiali-server.patch

162 lines
6.0 KiB
Diff

diff -x '*.tgz' -x '*.lock' -uNr packages/rancher-kiali-server/charts-original/Chart.yaml packages/rancher-kiali-server/charts/Chart.yaml
--- packages/rancher-kiali-server/charts-original/Chart.yaml
+++ packages/rancher-kiali-server/charts/Chart.yaml
@@ -1,20 +1,23 @@
apiVersion: v2
appVersion: v1.22.0
-description: Kiali is an open source project for service mesh observability, refer
- to https://www.kiali.io for details.
+description: Rancher chart based on Kiali Server, containing standard defaults. Installed as sub-chart with customized values in Rancher's Istio.
home: https://github.com/kiali/kiali
icon: https://raw.githubusercontent.com/kiali/kiali.io/master/themes/kiali/static/img/kiali_logo_masthead.png
keywords:
-- istio
-- kiali
+ - istio
+ - kiali
maintainers:
-- email: kiali-users@googlegroups.com
- name: Kiali
- url: https://kiali.io
-name: kiali-server
+ - email: kiali-users@googlegroups.com
+ name: Kiali
+ url: https://kiali.io
+name: rancher-kiali-server
sources:
-- https://github.com/kiali/kiali
-- https://github.com/kiali/kiali-ui
-- https://github.com/kiali/kiali-operator
-- https://github.com/kiali/helm-charts
+ - https://github.com/kiali/kiali
+ - https://github.com/kiali/kiali-ui
+ - https://github.com/kiali/kiali-operator
+ - https://github.com/kiali/helm-charts
version: 1.22.0
+annotations:
+ 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/_helpers.tpl packages/rancher-kiali-server/charts/templates/_helpers.tpl
--- packages/rancher-kiali-server/charts-original/templates/_helpers.tpl
+++ packages/rancher-kiali-server/charts/templates/_helpers.tpl
@@ -17,10 +17,7 @@
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
- {{- if contains $name .Release.Name }}
- {{- .Release.Name | trunc 63 | trimSuffix "-" }}
- {{- else }}
- {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
+ {{- printf "%s" $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
@@ -170,3 +167,11 @@
{{- end }}
{{- end }}
{{- end }}
+
+{{- define "system_default_registry" -}}
+{{- if .Values.global.systemDefaultRegistry -}}
+{{- printf "%s/" .Values.global.systemDefaultRegistry -}}
+{{- else -}}
+{{- "" -}}
+{{- end -}}
+{{- end -}}
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
@@ -45,7 +45,7 @@
{{- end }}
{{- end }}
containers:
- - image: "{{ .Values.deployment.image_name }}:{{ .Values.deployment.image_version }}"
+ - image: "{{ template "system_default_registry" . }}{{ .Values.deployment.repository }}:{{ .Values.deployment.tag }}"
imagePullPolicy: {{ .Values.deployment.image_pull_policy | default "Always" }}
name: {{ include "kiali-server.fullname" . }}
command:
@@ -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='/k8s/clusters/{{ .Values.global.rancher.clusterId }}/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
#
@@ -57,10 +60,10 @@
custom_dashboards:
excludes: ['']
includes: ['*']
- image_name: quay.io/kiali/kiali
+ repository: kiali/kiali
image_pull_policy: "Always"
image_pull_secrets: []
- image_version: v1.22.0
+ tag: v1.22.0
ingress_enabled: true
node_selector: {}
override_ingress_yaml:
@@ -182,3 +185,13 @@
web_fqdn: ""
web_root: ""
web_schema: ""
+
+# Common settings used among istio subcharts.
+global:
+
+ # Specify rancher clusterId of external tracing config
+ # https://github.com/istio/istio.io/issues/4146#issuecomment-493543032
+ rancher:
+ clusterId:
+
+ systemDefaultRegistry: ""