diff --git a/designate/Chart.yaml b/designate/Chart.yaml index 6d5a0d9285..e3aeddd8b6 100644 --- a/designate/Chart.yaml +++ b/designate/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Designate name: designate -version: 0.2.9 +version: 0.2.10 home: https://docs.openstack.org/designate/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Designate/OpenStack_Project_Designate_vertical.jpg sources: diff --git a/designate/templates/bin/_designate-api.sh.tpl b/designate/templates/bin/_designate-api.sh.tpl index c1dfa37001..f2e41a6717 100644 --- a/designate/templates/bin/_designate-api.sh.tpl +++ b/designate/templates/bin/_designate-api.sh.tpl @@ -16,8 +16,7 @@ set -ex COMMAND="${@:-start}" function start () { - exec designate-api \ - --config-file /etc/designate/designate.conf + exec uwsgi --ini /etc/designate/designate-api-uwsgi.ini } function stop () { diff --git a/designate/templates/configmap-etc.yaml b/designate/templates/configmap-etc.yaml index dd1d4a23d5..6b09894e51 100644 --- a/designate/templates/configmap-etc.yaml +++ b/designate/templates/configmap-etc.yaml @@ -65,6 +65,15 @@ {{- if empty (index .Values.conf.designate "service:api").api_base_uri -}} {{- $_ := tuple "dns" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set (index .Values.conf.designate "service:api") "api_base_uri" -}} {{- end -}} + +{{- if empty .Values.conf.designate_api_uwsgi.uwsgi.processes -}} +{{- $_ := set .Values.conf.designate_api_uwsgi.uwsgi "processes" (index .Values.conf.designate "service:api").workers -}} +{{- end -}} +{{- if empty (index .Values.conf.designate_api_uwsgi.uwsgi "http-socket") -}} +{{- $http_socket_port := tuple "dns" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }} +{{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }} +{{- $_ := set .Values.conf.designate_api_uwsgi.uwsgi "http-socket" $http_socket -}} +{{- end -}} --- apiVersion: v1 kind: Secret @@ -73,6 +82,7 @@ metadata: type: Opaque data: designate.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.designate | b64enc }} + designate-api-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.designate_api_uwsgi | b64enc }} api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }} policy.yaml: {{ toYaml .Values.conf.policy | b64enc }} logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }} diff --git a/designate/templates/deployment-api.yaml b/designate/templates/deployment-api.yaml index b6680d874c..e9df6b6e4d 100644 --- a/designate/templates/deployment-api.yaml +++ b/designate/templates/deployment-api.yaml @@ -92,6 +92,10 @@ spec: mountPath: /etc/designate/policy.yaml subPath: policy.yaml readOnly: true + - name: designate-etc + mountPath: /etc/designate/designate-api-uwsgi.ini + subPath: designate-api-uwsgi.ini + readOnly: true {{- if .Values.conf.designate.DEFAULT.log_config_append }} - name: designate-etc mountPath: {{ .Values.conf.designate.DEFAULT.log_config_append }} diff --git a/designate/values.yaml b/designate/values.yaml index 1892dd263f..80051e752d 100644 --- a/designate/values.yaml +++ b/designate/values.yaml @@ -528,6 +528,22 @@ conf: formatter_default: format: "%(message)s" datefmt: "%Y-%m-%d %H:%M:%S" + designate_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: "designate-api:" + route-user-agent: '^kube-probe.* donotlog:' + thunder-lock: true + worker-reload-mercy: 80 + wsgi-file: /var/lib/openstack/bin/designate-api-wsgi # Names of secrets used by bootstrap and environmental checks secrets: diff --git a/releasenotes/notes/designate.yaml b/releasenotes/notes/designate.yaml index 0234ece111..2f02cfc143 100644 --- a/releasenotes/notes/designate.yaml +++ b/releasenotes/notes/designate.yaml @@ -13,4 +13,5 @@ designate: - 0.2.7 Use HTTP probe instead of TCP probe - 0.2.8 Remove default policy rules - 0.2.9 Define service_type in keystone_authtoken to support application credentials with access rules + - 0.2.10 Uses uWSGI for API service ...