Merge "Allow more generic overrides for horizon"

This commit is contained in:
Zuul 2019-04-05 06:13:44 +00:00 committed by Gerrit Code Review
commit 3d76d5da56
3 changed files with 26 additions and 6 deletions

View File

@ -27,8 +27,17 @@ function start () {
# wsgi/horizon-http needs open files here, including secret_key_store
chown -R horizon ${SITE_PACKAGES_ROOT}/openstack_dashboard/local/
a2enmod rewrite
a2dismod status
{{- if .Values.conf.software.apache2.a2enmod }}
{{- range .Values.conf.software.apache2.a2enmod }}
a2enmod {{ . }}
{{- end }}
{{- end }}
{{- if .Values.conf.software.apache2.a2dismod }}
{{- range .Values.conf.software.apache2.a2dismod }}
a2dismod {{ . }}
{{- end }}
{{- end }}
if [ -f /etc/apache2/envvars ]; then
# Loading Apache2 ENV variables
@ -53,11 +62,11 @@ function start () {
/tmp/manage.py compress --force
rm -rf /tmp/_tmp_.secret_key_store.lock /tmp/.secret_key_store
exec apache2 -DFOREGROUND
exec {{ .Values.conf.software.apache2.binary }} {{ .Values.conf.software.apache2.start_parameters }}
}
function stop () {
apachectl -k graceful-stop
{{ .Values.conf.software.apache2.binary }} -k graceful-stop
}
$COMMAND

View File

@ -101,12 +101,12 @@ spec:
subPath: manage.py
readOnly: true
- name: horizon-etc
mountPath: /etc/apache2/sites-enabled/000-default.conf
mountPath: {{ .Values.conf.software.apache2.site_dir }}/000-default.conf
subPath: horizon.conf
readOnly: true
{{- if .Values.conf.horizon.security }}
- name: horizon-etc
mountPath: /etc/apache2/conf-available/security.conf
mountPath: {{ .Values.conf.software.apache2.conf_dir }}/security.conf
subPath: security.conf
readOnly: true
{{- end }}

View File

@ -57,6 +57,17 @@ network:
port: 31000
conf:
software:
apache2:
binary: apache2
start_parameters: -DFOREGROUND
site_dir: /etc/apache2/sites-enable
conf_dir: /etc/apache2/conf-enabled
mods_dir: /etc/apache2/mods-available
a2enmod:
- rewrite
a2dismod:
- status
horizon:
apache: |
Listen 0.0.0.0:{{ tuple "dashboard" "internal" "web" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}