diff --git a/manila/Chart.yaml b/manila/Chart.yaml index a332c5c576..e5b802b17c 100644 --- a/manila/Chart.yaml +++ b/manila/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Manila name: manila -version: 0.1.7 +version: 0.1.8 home: https://docs.openstack.org/manila/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Manila/OpenStack_Project_Manila_vertical.png sources: diff --git a/manila/templates/bin/_manila-api.sh.tpl b/manila/templates/bin/_manila-api.sh.tpl index 3521103a93..dbeecd7fe6 100644 --- a/manila/templates/bin/_manila-api.sh.tpl +++ b/manila/templates/bin/_manila-api.sh.tpl @@ -18,8 +18,7 @@ set -ex COMMAND="${@:-start}" function start () { - exec manila-api \ - --config-file /etc/manila/manila.conf + exec uwsgi --ini /etc/manila/manila-api-uwsgi.ini } function stop () { diff --git a/manila/templates/configmap-etc.yaml b/manila/templates/configmap-etc.yaml index e230aa4330..fa311965c1 100644 --- a/manila/templates/configmap-etc.yaml +++ b/manila/templates/configmap-etc.yaml @@ -207,6 +207,15 @@ limitations under the License. {{- $_ := set .Values.conf.manila.glance "memcache_secret_key" $memcache_secret_key -}} {{- end -}} +{{- if empty .Values.conf.manila_api_uwsgi.uwsgi.processes -}} +{{- $_ := set .Values.conf.manila_api_uwsgi.uwsgi "processes" .Values.conf.manila.DEFAULT.osapi_share_workers -}} +{{- end -}} +{{- if empty (index .Values.conf.manila_api_uwsgi.uwsgi "http-socket") -}} +{{- $http_socket_port := tuple "sharev2" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }} +{{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }} +{{- $_ := set .Values.conf.manila_api_uwsgi.uwsgi "http-socket" $http_socket -}} +{{- end -}} + {{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}} {{- $fluentd_host := tuple "fluentd" "internal" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} {{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }} @@ -228,6 +237,7 @@ type: Opaque data: rally_tests.yaml: {{ toYaml .Values.conf.rally_tests.tests | b64enc }} manila.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.manila | b64enc }} + manila-api-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.manila_api_uwsgi | b64enc }} {{- range $key, $value := $envAll.Values.conf.rootwrap_filters }} {{- $filePrefix := replace "_" "-" $key }} {{ printf "%s.filters" $filePrefix }}: {{ $value.content | b64enc }} diff --git a/manila/templates/deployment-api.yaml b/manila/templates/deployment-api.yaml index 0e4505a023..c6e1d0744c 100644 --- a/manila/templates/deployment-api.yaml +++ b/manila/templates/deployment-api.yaml @@ -94,6 +94,10 @@ spec: mountPath: /etc/manila/manila.conf subPath: manila.conf readOnly: true + - name: manila-etc + mountPath: /etc/manila/manila-api-uwsgi.ini + subPath: manila-api-uwsgi.ini + readOnly: true {{- if .Values.conf.manila.DEFAULT.log_config_append }} - name: manila-etc mountPath: {{ .Values.conf.manila.DEFAULT.log_config_append }} diff --git a/manila/values.yaml b/manila/values.yaml index 4c3f83a68e..01a52ce892 100644 --- a/manila/values.yaml +++ b/manila/values.yaml @@ -850,6 +850,23 @@ conf: sla: failure_rate: max: 0 + manila_api_uwsgi: + uwsgi: + add-header: "Connection: close" + buffer-size: 65535 + die-on-term: true + enable-threads: true + exit-on-reload: false + hook-master-start: unix_signal:15 gracefully_kill_them_all + lazy-apps: true + log-x-forwarded-for: true + master: true + procname-prefix-spaced: "manila-api:" + route-user-agent: '^kube-probe.* donotlog:' + thunder-lock: true + worker-reload-mercy: 80 + wsgi-file: /var/lib/openstack/bin/manila-wsgi + # Names of secrets used by bootstrap and environmental checks secrets: identity: diff --git a/releasenotes/notes/manila.yaml b/releasenotes/notes/manila.yaml index eda1defa88..de81efe645 100644 --- a/releasenotes/notes/manila.yaml +++ b/releasenotes/notes/manila.yaml @@ -8,4 +8,5 @@ manila: - 0.1.5 Update port name of service-api.yaml - 0.1.6 Add 2023.2 Ubuntu Jammy overrides - 0.1.7 Properly config network host for share service + - 0.1.8 uses uWSGI for API service ...