diff --git a/nova/templates/configmap-etc.yaml b/nova/templates/configmap-etc.yaml index 41cc854d95..cbd69eeae4 100644 --- a/nova/templates/configmap-etc.yaml +++ b/nova/templates/configmap-etc.yaml @@ -239,10 +239,9 @@ data: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | indent 4 }} nova-ironic.conf: | {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.nova_ironic | indent 4 }} - wsgi-nova-placement.conf: | -{{- tuple .Values.conf.wsgi_placement "etc/_wsgi-nova-placement.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }} - ssh-config.sh: | -{{- tuple .Values.conf.ssh "etc/_ssh-config.tpl" . | include "helm-toolkit.utils.configmap_templater" }} +{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.wsgi_placement "key" "wsgi-nova-placement.conf" ) | indent 2 }} +# FIXME(portdirect): why is this file suffixed .sh? +{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.ssh "key" "ssh-config.sh" ) | indent 2 }} {{- end }} {{- end }} {{- if .Values.manifests.configmap_etc }} diff --git a/nova/templates/etc/_ssh-config.tpl b/nova/templates/etc/_ssh-config.tpl deleted file mode 100644 index ca2966bf3a..0000000000 --- a/nova/templates/etc/_ssh-config.tpl +++ /dev/null @@ -1,4 +0,0 @@ -Host * - StrictHostKeyChecking no - UserKnownHostsFile /dev/null - Port {{ .Values.network.ssh.port }} diff --git a/nova/templates/etc/_wsgi-nova-placement.conf.tpl b/nova/templates/etc/_wsgi-nova-placement.conf.tpl deleted file mode 100644 index 43e1e6c80e..0000000000 --- a/nova/templates/etc/_wsgi-nova-placement.conf.tpl +++ /dev/null @@ -1,50 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -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. -*/}} - -Listen 0.0.0.0:{{ tuple "placement" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} - -LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy - -SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded -CustomLog /dev/stdout combined env=!forwarded -CustomLog /dev/stdout proxy env=forwarded - - - WSGIDaemonProcess placement-api processes=1 threads=4 user=nova group=nova display-name=%{GROUP} - WSGIProcessGroup placement-api - WSGIScriptAlias / /var/www/cgi-bin/nova/nova-placement-api - WSGIApplicationGroup %{GLOBAL} - WSGIPassAuthorization On - = 2.4> - ErrorLogFormat "%{cu}t %M" - - ErrorLog /dev/stdout - - SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded - CustomLog /dev/stdout combined env=!forwarded - CustomLog /dev/stdout proxy env=forwarded - - -Alias /placement /var/www/cgi-bin/nova/nova-placement-api - - SetHandler wsgi-script - Options +ExecCGI - - WSGIProcessGroup placement-api - WSGIApplicationGroup %{GLOBAL} - WSGIPassAuthorization On - diff --git a/nova/values.yaml b/nova/values.yaml index ecf2708775..cfb5fc875b 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -451,9 +451,11 @@ conf: user: "cinder" keyring: null secret_uuid: 457eb676-33da-42ec-9a8c-9293d545c337 - ssh: - override: - append: + ssh: | + Host * + StrictHostKeyChecking no + UserKnownHostsFile /dev/null + Port {{ .Values.network.ssh.port }} rally_tests: run_tempest: false tests: @@ -1050,9 +1052,41 @@ conf: # INFO means log all usage # ERROR means only log unsuccessful attempts syslog_log_level=ERROR - wsgi_placement: - override: - append: + wsgi_placement: | + Listen 0.0.0.0:{{ tuple "placement" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined + LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy + + SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded + CustomLog /dev/stdout combined env=!forwarded + CustomLog /dev/stdout proxy env=forwarded + + + WSGIDaemonProcess placement-api processes=1 threads=4 user=nova group=nova display-name=%{GROUP} + WSGIProcessGroup placement-api + WSGIScriptAlias / /var/www/cgi-bin/nova/nova-placement-api + WSGIApplicationGroup %{GLOBAL} + WSGIPassAuthorization On + = 2.4> + ErrorLogFormat "%{cu}t %M" + + ErrorLog /dev/stdout + + SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded + CustomLog /dev/stdout combined env=!forwarded + CustomLog /dev/stdout proxy env=forwarded + + + Alias /placement /var/www/cgi-bin/nova/nova-placement-api + + SetHandler wsgi-script + Options +ExecCGI + + WSGIProcessGroup placement-api + WSGIApplicationGroup %{GLOBAL} + WSGIPassAuthorization On + rootwrap_filters: api_metadata: pods: