Merge "Add custom logo"

This commit is contained in:
Zuul 2022-03-23 20:21:36 +00:00 committed by Gerrit Code Review
commit b786891a3a
6 changed files with 58 additions and 1 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0 appVersion: v1.0.0
description: OpenStack-Helm Horizon description: OpenStack-Helm Horizon
name: horizon name: horizon
version: 0.2.16 version: 0.2.17
home: https://docs.openstack.org/horizon/latest/ home: https://docs.openstack.org/horizon/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Horizon/OpenStack_Project_Horizon_vertical.png icon: https://www.openstack.org/themes/openstack/images/project-mascots/Horizon/OpenStack_Project_Horizon_vertical.png
sources: sources:

View File

@ -77,6 +77,13 @@ function start () {
unset PANEL_DIR unset PANEL_DIR
fi fi
# Copy custom logo images
{{- if .Values.manifests.configmap_logo }}
cp /tmp/favicon.ico ${SITE_PACKAGES_ROOT}/openstack_dashboard/static/dashboard/img/favicon.ico
cp /tmp/logo.svg ${SITE_PACKAGES_ROOT}/openstack_dashboard/static/dashboard/img/logo.svg
cp /tmp/logo-splash.svg ${SITE_PACKAGES_ROOT}/openstack_dashboard/static/dashboard/img/logo-splash.svg
{{- end }}
# Compress Horizon's assets. # Compress Horizon's assets.
/tmp/manage.py collectstatic --noinput /tmp/manage.py collectstatic --noinput
/tmp/manage.py compress --force /tmp/manage.py compress --force

View File

@ -0,0 +1,28 @@
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.manifests.configmap_logo }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: horizon-logo
binaryData:
favicon.ico: {{ .Values.conf.horizon.branding.favicon }}
data:
logo-splash.svg: |-
{{ .Values.conf.horizon.branding.logo_splash | nindent 4 }}
logo.svg: |-
{{ .Values.conf.horizon.branding.logo | nindent 4 }}
{{- end }}

View File

@ -143,6 +143,17 @@ spec:
subPath: {{ base $localSettingsFile }} subPath: {{ base $localSettingsFile }}
readOnly: true readOnly: true
{{- end }} {{- end }}
{{- if .Values.manifests.configmap_logo }}
- name: horizon-logo
mountPath: /tmp/logo.svg
subPath: logo.svg
- name: horizon-logo
mountPath: /tmp/logo-splash.svg
subPath: logo-splash.svg
- name: horizon-logo
mountPath: /tmp/favicon.ico
subPath: favicon.ico
{{- end }}
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.secrets.tls.dashboard.dashboard.internal "path" "/etc/openstack-dashboard/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} {{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.secrets.tls.dashboard.dashboard.internal "path" "/etc/openstack-dashboard/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal "path" "/etc/mysql/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }} {{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal "path" "/etc/mysql/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}
{{ if $mounts_horizon.volumeMounts }}{{ toYaml $mounts_horizon.volumeMounts | indent 12 }}{{ end }} {{ if $mounts_horizon.volumeMounts }}{{ toYaml $mounts_horizon.volumeMounts | indent 12 }}{{ end }}
@ -161,6 +172,11 @@ spec:
secret: secret:
secretName: horizon-etc secretName: horizon-etc
defaultMode: 0444 defaultMode: 0444
{{- if .Values.manifests.configmap_logo }}
- name: horizon-logo
configMap:
name: horizon-logo
{{- end }}
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }} {{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }}
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.secrets.tls.dashboard.dashboard.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }} {{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.secrets.tls.dashboard.dashboard.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }}
{{ if $mounts_horizon.volumes }}{{ toYaml $mounts_horizon.volumes | indent 8 }}{{ end }} {{ if $mounts_horizon.volumes }}{{ toYaml $mounts_horizon.volumes | indent 8 }}{{ end }}

View File

@ -73,6 +73,10 @@ conf:
a2dismod: a2dismod:
- status - status
horizon: horizon:
branding:
logo:
logo_splash:
favicon:
apache: | apache: |
<IfVersion < 2.4> <IfVersion < 2.4>
Listen 0.0.0.0:{{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} Listen 0.0.0.0:{{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
@ -1346,6 +1350,7 @@ manifests:
certificates: false certificates: false
configmap_bin: true configmap_bin: true
configmap_etc: true configmap_etc: true
configmap_logo: false
deployment: true deployment: true
ingress_api: true ingress_api: true
job_db_init: true job_db_init: true

View File

@ -26,4 +26,5 @@ horizon:
- 0.2.14 Add OPENSTACK_ENDPOINT_TYPE value - 0.2.14 Add OPENSTACK_ENDPOINT_TYPE value
- 0.2.15 Add local_settings.d - 0.2.15 Add local_settings.d
- 0.2.16 Fix container-infra value - 0.2.16 Fix container-infra value
- 0.2.17 Add custom logo
... ...