Glance: Support uWSGI for API server
Currently Glance 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: I7caec5d17f33d35843b4537965bafbb9b73d62ea
This commit is contained in:
parent
643d643b8d
commit
a2fe5e1f0e
@ -14,7 +14,7 @@ apiVersion: v1
|
|||||||
appVersion: v1.0.0
|
appVersion: v1.0.0
|
||||||
description: OpenStack-Helm Glance
|
description: OpenStack-Helm Glance
|
||||||
name: glance
|
name: glance
|
||||||
version: 0.4.20
|
version: 0.4.21
|
||||||
home: https://docs.openstack.org/glance/latest/
|
home: https://docs.openstack.org/glance/latest/
|
||||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Glance/OpenStack_Project_Glance_vertical.png
|
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Glance/OpenStack_Project_Glance_vertical.png
|
||||||
sources:
|
sources:
|
||||||
|
@ -18,8 +18,7 @@ set -ex
|
|||||||
COMMAND="${@:-start}"
|
COMMAND="${@:-start}"
|
||||||
|
|
||||||
function start () {
|
function start () {
|
||||||
exec glance-api \
|
exec uwsgi --ini /etc/glance/glance-api-uwsgi.ini
|
||||||
--config-file /etc/glance/glance-api.conf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function stop () {
|
function stop () {
|
||||||
|
@ -100,6 +100,15 @@ limitations under the License.
|
|||||||
{{- $_ := tuple "image" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.glance.DEFAULT "bind_port" -}}
|
{{- $_ := tuple "image" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | set .Values.conf.glance.DEFAULT "bind_port" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if empty .Values.conf.glance_api_uwsgi.uwsgi.processes -}}
|
||||||
|
{{- $_ := set .Values.conf.glance_api_uwsgi.uwsgi "processes" .Values.conf.glance.DEFAULT.workers -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if empty (index .Values.conf.glance_api_uwsgi.uwsgi "http-socket") -}}
|
||||||
|
{{- $http_socket_port := tuple "image" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }}
|
||||||
|
{{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }}
|
||||||
|
{{- $_ := set .Values.conf.glance_api_uwsgi.uwsgi "http-socket" $http_socket -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- if and (empty .Values.conf.logging.handler_fluent) (has "fluent" .Values.conf.logging.handlers.keys) -}}
|
{{- 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_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" }}
|
{{- $fluentd_port := tuple "fluentd" "internal" "service" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||||
@ -141,6 +150,7 @@ type: Opaque
|
|||||||
data:
|
data:
|
||||||
rally_tests.yaml: {{ toYaml .Values.conf.rally_tests.tests | b64enc }}
|
rally_tests.yaml: {{ toYaml .Values.conf.rally_tests.tests | b64enc }}
|
||||||
glance-api.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.glance | b64enc }}
|
glance-api.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.glance | b64enc }}
|
||||||
|
glance-api-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.glance_api_uwsgi | b64enc }}
|
||||||
logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }}
|
logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }}
|
||||||
glance-api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }}
|
glance-api-paste.ini: {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | b64enc }}
|
||||||
policy.yaml: {{ toYaml .Values.conf.policy | b64enc }}
|
policy.yaml: {{ toYaml .Values.conf.policy | b64enc }}
|
||||||
|
@ -214,6 +214,10 @@ spec:
|
|||||||
mountPath: /etc/glance/glance-api.conf
|
mountPath: /etc/glance/glance-api.conf
|
||||||
subPath: glance-api.conf
|
subPath: glance-api.conf
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
- name: glance-etc
|
||||||
|
mountPath: /etc/glance/glance-api-uwsgi.ini
|
||||||
|
subPath: glance-api-uwsgi.ini
|
||||||
|
readOnly: true
|
||||||
{{- if .Values.conf.glance.DEFAULT.log_config_append }}
|
{{- if .Values.conf.glance.DEFAULT.log_config_append }}
|
||||||
- name: glance-etc
|
- name: glance-etc
|
||||||
mountPath: {{ .Values.conf.glance.DEFAULT.log_config_append }}
|
mountPath: {{ .Values.conf.glance.DEFAULT.log_config_append }}
|
||||||
|
@ -389,6 +389,22 @@ conf:
|
|||||||
priority: 0
|
priority: 0
|
||||||
apply-to: all
|
apply-to: all
|
||||||
pattern: '^(?!(amq\.|reply_)).*'
|
pattern: '^(?!(amq\.|reply_)).*'
|
||||||
|
glance_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: "glance-api:"
|
||||||
|
route-user-agent: '^kube-probe.* donotlog:'
|
||||||
|
thunder-lock: true
|
||||||
|
worker-reload-mercy: 80
|
||||||
|
wsgi-file: /var/lib/openstack/bin/glance-wsgi-api
|
||||||
|
|
||||||
network:
|
network:
|
||||||
api:
|
api:
|
||||||
@ -883,14 +899,14 @@ pod:
|
|||||||
readiness:
|
readiness:
|
||||||
enabled: true
|
enabled: true
|
||||||
params:
|
params:
|
||||||
periodSeconds: 15
|
periodSeconds: 10
|
||||||
timeoutSeconds: 10
|
timeoutSeconds: 5
|
||||||
liveness:
|
liveness:
|
||||||
enabled: true
|
enabled: true
|
||||||
params:
|
params:
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 15
|
periodSeconds: 10
|
||||||
timeoutSeconds: 10
|
timeoutSeconds: 5
|
||||||
resources:
|
resources:
|
||||||
enabled: false
|
enabled: false
|
||||||
api:
|
api:
|
||||||
|
@ -4,8 +4,6 @@ images:
|
|||||||
nginx: docker.io/nginx:1.18.0
|
nginx: docker.io/nginx:1.18.0
|
||||||
conf:
|
conf:
|
||||||
glance:
|
glance:
|
||||||
DEFAULT:
|
|
||||||
bind_host: 127.0.0.1
|
|
||||||
keystone_authtoken:
|
keystone_authtoken:
|
||||||
cafile: /etc/glance/certs/ca.crt
|
cafile: /etc/glance/certs/ca.crt
|
||||||
glance_store:
|
glance_store:
|
||||||
@ -16,6 +14,9 @@ conf:
|
|||||||
ssl_ca_file: /etc/rabbitmq/certs/ca.crt
|
ssl_ca_file: /etc/rabbitmq/certs/ca.crt
|
||||||
ssl_cert_file: /etc/rabbitmq/certs/tls.crt
|
ssl_cert_file: /etc/rabbitmq/certs/tls.crt
|
||||||
ssl_key_file: /etc/rabbitmq/certs/tls.key
|
ssl_key_file: /etc/rabbitmq/certs/tls.key
|
||||||
|
glance_api_uwsgi:
|
||||||
|
uwsgi:
|
||||||
|
http-socket: 127.0.0.1:9292
|
||||||
nginx: |
|
nginx: |
|
||||||
worker_processes 1;
|
worker_processes 1;
|
||||||
daemon off;
|
daemon off;
|
||||||
|
@ -54,4 +54,5 @@ glance:
|
|||||||
- 0.4.18 Enable custom annotations for Openstack pods
|
- 0.4.18 Enable custom annotations for Openstack pods
|
||||||
- 0.4.19 Add 2024.1 overrides
|
- 0.4.19 Add 2024.1 overrides
|
||||||
- 0.4.20 Add readiness probe initial delay
|
- 0.4.20 Add readiness probe initial delay
|
||||||
|
- 0.4.21 Use uWSGI
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user