diff --git a/horizon/Chart.yaml b/horizon/Chart.yaml index 8313bbcc2d..fa4cb4e4c0 100644 --- a/horizon/Chart.yaml +++ b/horizon/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Horizon name: horizon -version: 0.3.15 +version: 0.3.16 home: https://docs.openstack.org/horizon/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Horizon/OpenStack_Project_Horizon_vertical.png sources: diff --git a/horizon/templates/bin/_horizon.sh.tpl b/horizon/templates/bin/_horizon.sh.tpl index 8d2b0be2d5..0c2035a38e 100644 --- a/horizon/templates/bin/_horizon.sh.tpl +++ b/horizon/templates/bin/_horizon.sh.tpl @@ -25,6 +25,9 @@ function start () { {{- range $key, $value := .Values.conf.horizon.local_settings_d }} ln -s /etc/openstack-dashboard/local_settings.d/{{ $key }}.py ${SITE_PACKAGES_ROOT}/openstack_dashboard/local/local_settings.d/{{ $key }}.py {{- end }} + {{- range $key, $value := .Values.conf.horizon.custom_panels }} + ln -s /etc/openstack-dashboard/custom_panels/{{ $key }}.py ${SITE_PACKAGES_ROOT}/openstack_dashboard/local/enabled/{{ $key }}.py + {{- end }} # wsgi/horizon-http needs open files here, including secret_key_store chown -R horizon ${SITE_PACKAGES_ROOT}/openstack_dashboard/local/ diff --git a/horizon/templates/configmap-etc.yaml b/horizon/templates/configmap-etc.yaml index d02cf2ba8d..450bb12f12 100644 --- a/horizon/templates/configmap-etc.yaml +++ b/horizon/templates/configmap-etc.yaml @@ -26,6 +26,9 @@ data: {{- if .Values.conf.horizon.security }} {{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.horizon.security "key" "security.conf" "format" "Secret" ) | indent 2 }} {{- end }} +{{- range $key, $value := .Values.conf.horizon.custom_panels }} + {{ printf "%s.py" $key }}: {{ $value | b64enc }} +{{- end }} {{- range $key, $value := .Values.conf.horizon.policy }} {{ printf "%s_policy.json" $key }}: {{ $value | toPrettyJson | b64enc }} {{- end }} diff --git a/horizon/templates/deployment.yaml b/horizon/templates/deployment.yaml index 0037fef329..93d80d34ba 100644 --- a/horizon/templates/deployment.yaml +++ b/horizon/templates/deployment.yaml @@ -133,6 +133,13 @@ spec: mountPath: /etc/openstack-dashboard/local_settings subPath: local_settings readOnly: true + {{- range $key, $value := $envAll.Values.conf.horizon.custom_panels }} + {{- $customPanelsFile := printf "/etc/openstack-dashboard/custom_panels/%s.py" $key }} + - name: horizon-etc + mountPath: {{ $customPanelsFile }} + subPath: {{ base $customPanelsFile }} + readOnly: true + {{- end }} {{- range $key, $value := $envAll.Values.conf.horizon.policy }} {{- $policyYamlFile := printf "/etc/openstack-dashboard/%s_policy.yaml" $key }} - name: horizon-etc diff --git a/horizon/values.yaml b/horizon/values.yaml index 8cfaf5b481..b043879a35 100644 --- a/horizon/values.yaml +++ b/horizon/values.yaml @@ -184,6 +184,14 @@ conf: # site as frames. This defends against clickjacking attacks. # Requires mod_headers to be enabled. # + custom_panels: {} + ## For example, _5000_disable_project_vg_snapshots.py + # _5000_disable_project_vg_snapshots: | + # PANEL = 'vg_snapshots' + # PANEL_DASHBOARD = 'project' + # PANEL_GROUP = 'volumes' + # REMOVE_PANEL = True + ## https://docs.openstack.org/horizon/latest/configuration/pluggable_panels.html#id2 local_settings_d: {} ## For example, _50_monasca_ui_settings.py # _50_monasca_ui_settings: | diff --git a/releasenotes/notes/horizon.yaml b/releasenotes/notes/horizon.yaml index 832bee2187..41db279251 100644 --- a/releasenotes/notes/horizon.yaml +++ b/releasenotes/notes/horizon.yaml @@ -52,4 +52,5 @@ horizon: - 0.3.13 Make selenium v4 syntax optional - 0.3.14 Add 2023.2 Ubuntu Jammy overrides - 0.3.15 Update osh-selenium image used by default + - 0.3.16 Add support for custom panels ...