chore(octavia): use uwsgi (#622)
diff --git a/charts/octavia/templates/bin/_octavia-api.sh.tpl b/charts/octavia/templates/bin/_octavia-api.sh.tpl
index 9e32268..b045acb 100644
--- a/charts/octavia/templates/bin/_octavia-api.sh.tpl
+++ b/charts/octavia/templates/bin/_octavia-api.sh.tpl
@@ -20,8 +20,7 @@
COMMAND="${@:-start}"
function start () {
- exec octavia-api \
- --config-file /etc/octavia/octavia.conf
+ exec uwsgi --ini /etc/octavia/octavia-api-uwsgi.ini
}
function stop () {
diff --git a/charts/octavia/templates/configmap-etc.yaml b/charts/octavia/templates/configmap-etc.yaml
index 8d3a653..b8005a5 100644
--- a/charts/octavia/templates/configmap-etc.yaml
+++ b/charts/octavia/templates/configmap-etc.yaml
@@ -88,6 +88,12 @@
{{- $_ := tuple "oslo_messaging" "internal" "octavia" "amqp" . | include "helm-toolkit.endpoints.authenticated_transport_endpoint_uri_lookup" | set .Values.conf.octavia.DEFAULT "transport_url" -}}
{{- end -}}
+{{- if empty (index .Values.conf.octavia_api_uwsgi.uwsgi "http-socket") -}}
+{{- $http_socket_port := tuple "load_balancer" "service" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | toString }}
+{{- $http_socket := printf "0.0.0.0:%s" $http_socket_port }}
+{{- $_ := set .Values.conf.octavia_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" }}
@@ -108,6 +114,7 @@
type: Opaque
data:
octavia.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.octavia | b64enc }}
+ octavia-api-uwsgi.ini: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.octavia_api_uwsgi | b64enc }}
logging.conf: {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.logging | b64enc }}
{{- end }}
{{- end }}
diff --git a/charts/octavia/templates/deployment-api.yaml b/charts/octavia/templates/deployment-api.yaml
index 2b4a498..da15972 100644
--- a/charts/octavia/templates/deployment-api.yaml
+++ b/charts/octavia/templates/deployment-api.yaml
@@ -87,6 +87,10 @@
mountPath: /etc/octavia/octavia.conf
subPath: octavia.conf
readOnly: true
+ - name: octavia-etc
+ mountPath: /etc/octavia/octavia-api-uwsgi.ini
+ subPath: octavia-api-uwsgi.ini
+ readOnly: true
{{- if .Values.conf.octavia.DEFAULT.log_config_append }}
- name: octavia-etc
mountPath: {{ .Values.conf.octavia.DEFAULT.log_config_append }}
diff --git a/charts/octavia/values.yaml b/charts/octavia/values.yaml
index 0f0ea75..699aa05 100644
--- a/charts/octavia/values.yaml
+++ b/charts/octavia/values.yaml
@@ -331,6 +331,23 @@
priority: 0
apply-to: all
pattern: '(notifications)\.'
+ octavia_api_uwsgi:
+ uwsgi:
+ processes: 4
+ 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: "octavia-api:"
+ route-user-agent: '^kube-probe.* donotlog:'
+ thunder-lock: true
+ worker-reload-mercy: 80
+ wsgi-file: /var/lib/openstack/bin/octavia-wsgi
secrets:
identity:
diff --git a/roles/defaults/vars/main.yml b/roles/defaults/vars/main.yml
index 6f71f69..8140c17 100644
--- a/roles/defaults/vars/main.yml
+++ b/roles/defaults/vars/main.yml
@@ -145,12 +145,12 @@
nova_service_cleaner: quay.io/vexxhost/cli:latest
nova_spiceproxy_assets: quay.io/vexxhost/nova@sha256:132aec4034dd7508443cd14c7c2b7859a20917b90e17d153a84e2d8f920b5f23 # image-source: quay.io/vexxhost/nova:zed
nova_spiceproxy: quay.io/vexxhost/nova@sha256:132aec4034dd7508443cd14c7c2b7859a20917b90e17d153a84e2d8f920b5f23 # image-source: quay.io/vexxhost/nova:zed
- octavia_api: quay.io/vexxhost/octavia@sha256:9065365ed1d731e5130dcf7d600bc8dc8ffa158093c53dd151eddfe49a29a5ee # image-source: quay.io/vexxhost/octavia:zed
- octavia_db_sync: quay.io/vexxhost/octavia@sha256:9065365ed1d731e5130dcf7d600bc8dc8ffa158093c53dd151eddfe49a29a5ee # image-source: quay.io/vexxhost/octavia:zed
+ octavia_api: quay.io/vexxhost/octavia@sha256:7a322440c8427ee8a1199268e2c34ff6d541314e7fbf8e3ce1d7f30cd827b697 # image-source: quay.io/vexxhost/octavia:zed
+ octavia_db_sync: quay.io/vexxhost/octavia@sha256:7a322440c8427ee8a1199268e2c34ff6d541314e7fbf8e3ce1d7f30cd827b697 # image-source: quay.io/vexxhost/octavia:zed
octavia_health_manager_init: quay.io/vexxhost/heat@sha256:2413e1d669a899685d0cc89c3333222ad004c567be0d5ca605dcc6a59c12af64 # image-source: quay.io/vexxhost/heat:zed
- octavia_health_manager: quay.io/vexxhost/octavia@sha256:9065365ed1d731e5130dcf7d600bc8dc8ffa158093c53dd151eddfe49a29a5ee # image-source: quay.io/vexxhost/octavia:zed
- octavia_housekeeping: quay.io/vexxhost/octavia@sha256:9065365ed1d731e5130dcf7d600bc8dc8ffa158093c53dd151eddfe49a29a5ee # image-source: quay.io/vexxhost/octavia:zed
- octavia_worker: quay.io/vexxhost/octavia@sha256:9065365ed1d731e5130dcf7d600bc8dc8ffa158093c53dd151eddfe49a29a5ee # image-source: quay.io/vexxhost/octavia:zed
+ octavia_health_manager: quay.io/vexxhost/octavia@sha256:7a322440c8427ee8a1199268e2c34ff6d541314e7fbf8e3ce1d7f30cd827b697 # image-source: quay.io/vexxhost/octavia:zed
+ octavia_housekeeping: quay.io/vexxhost/octavia@sha256:7a322440c8427ee8a1199268e2c34ff6d541314e7fbf8e3ce1d7f30cd827b697 # image-source: quay.io/vexxhost/octavia:zed
+ octavia_worker: quay.io/vexxhost/octavia@sha256:7a322440c8427ee8a1199268e2c34ff6d541314e7fbf8e3ce1d7f30cd827b697 # image-source: quay.io/vexxhost/octavia:zed
openvswitch_db_server: quay.io/vexxhost/openvswitch:2.17.3
openvswitch_vswitchd: quay.io/vexxhost/openvswitch:2.17.3
ovn_controller: quay.io/vexxhost/ovn-host:23.03.0