Files
charts/bitnami/kubeapps/templates/dashboard-config.yaml
2019-01-03 15:26:44 +00:00

45 lines
1.4 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "kubeapps.dashboard-config.fullname" . }}
labels:
app: {{ template "kubeapps.dashboard-config.fullname" . }}
chart: {{ template "kubeapps.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
vhost.conf: |-
server {
listen 8080;
server_name _;
gzip on;
gzip_static on;
location / {
# Redirects are required to be relative otherwise the internal hostname will be exposed
absolute_redirect off;
# Trailing / is required in the path for the React app to be loaded correctly
# The rewrite rule adds a trailing "/" to any path that does not contain "." neither "/".
# i.e kubeapps => kubeapps/
rewrite ^([^.]*[^/])$ $1/ permanent;
# Support for ingress prefixes maintaining compatibility with the default /
# 1 - Exactly two fragment URLs for files existing inside of the public/ dir
# i.e /[prefix]/config.json => /config.json
rewrite ^/[^/]+/([^/]+)$ /$1 break;
# 2 - Any static files bundled by webpack referenced by 3 or more URL segments
# i.e /[prefix]/static/main.js => static/main.js
rewrite ^/[^/]+/static/(.*) /static/$1 break;
try_files $uri /index.html;
}
}
config.json: |-
{
"namespace": "{{ .Release.Namespace }}",
"appVersion": "{{ .Chart.AppVersion }}"
}