Merge "Allow more generic overrides for placement"

This commit is contained in:
Zuul
2020-05-14 08:14:03 +00:00
committed by Gerrit Code Review
2 changed files with 29 additions and 4 deletions

View File

@@ -24,19 +24,32 @@ function start () {
cp -a $(type -p placement-api) /var/www/cgi-bin/placement/
if [ -f /etc/apache2/envvars ]; then
# Loading Apache2 ENV variables
source /etc/apache2/envvars
# Loading Apache2 ENV variables
source /etc/apache2/envvars
# The directory below has to be created due to the fact that
# libapache2-mod-wsgi-py3 doesn't create it in contrary by libapache2-mod-wsgi
mkdir -p ${APACHE_RUN_DIR}
fi
# Get rid of stale pid file if present.
rm -f /var/run/apache2/*.pid
# Start Apache2
exec apache2ctl -DFOREGROUND
{{- 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 }}
exec {{ .Values.conf.software.apache2.binary }} {{ .Values.conf.software.apache2.start_parameters }}
}
function stop () {
apache2ctl -k graceful-stop
{{ .Values.conf.software.apache2.binary }} -k graceful-stop
}
$COMMAND

View File

@@ -65,6 +65,18 @@ conf:
segregation: 'rule:context_is_admin'
admin_or_owner: 'rule:context_is_admin or project_id:%(project_id)s'
default: 'rule:admin_or_owner'
software:
apache2:
binary: apache2
start_parameters: -DFOREGROUND
# Enable/Disable modules
# a2enmod:
# - headers
# - rewrite
# a2dismod:
# - status
a2enmod: null
a2dismod: null
placement:
DEFAULT:
debug: false