Designate: Support uWSGI for API server
Currently Designate API server still using eventlet-based HTTP servers, it is generally considered more performant and flexible to run them using a generic HTTP server that supports WSGI. Change-Id: I8036ed5259c67ad1315815efa00eff80075b2ed2
This commit is contained in:
parent
f6ce5ad406
commit
ddd851d40e
@ -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:
|
||||
|
@ -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 () {
|
||||
|
@ -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 }}
|
||||
|
@ -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 }}
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user