diff --git a/components/envoy-configs/templates/gw-external.yaml.tpl b/components/envoy-configs/templates/gw-external.yaml.tpl index 97331a421..cbb857f26 100644 --- a/components/envoy-configs/templates/gw-external.yaml.tpl +++ b/components/envoy-configs/templates/gw-external.yaml.tpl @@ -69,6 +69,19 @@ spec: provider: type: Kubernetes kubernetes: + {{- with .Values.gateways.external.envoyDeployment }} + envoyDeployment: + {{- if .replicas }} + replicas: {{ .replicas }} + {{- end }} + {{- if .container }} + container: + {{- if .container.resources }} + resources: + {{- .container.resources | toYaml | nindent 12 }} + {{- end }} + {{- end }} + {{- end }} envoyService: annotations: {{- .Values.gateways.external.serviceAnnotations | toYaml | nindent 10 }} diff --git a/components/envoy-configs/templates/gw-internal.yaml.tpl b/components/envoy-configs/templates/gw-internal.yaml.tpl index a5f4785f8..95ee9a9e4 100644 --- a/components/envoy-configs/templates/gw-internal.yaml.tpl +++ b/components/envoy-configs/templates/gw-internal.yaml.tpl @@ -32,6 +32,19 @@ spec: provider: type: Kubernetes kubernetes: + {{- with .Values.gateways.internal.envoyDeployment }} + envoyDeployment: + {{- if .replicas }} + replicas: {{ .replicas }} + {{- end }} + {{- if .container }} + container: + {{- if .container.resources }} + resources: + {{- .container.resources | toYaml | nindent 12 }} + {{- end }} + {{- end }} + {{- end }} envoyService: annotations: {{- .Values.gateways.internal.serviceAnnotations | toYaml | nindent 10 }} diff --git a/components/envoy-configs/values.schema.json b/components/envoy-configs/values.schema.json index 536dd44c1..d356f2df7 100644 --- a/components/envoy-configs/values.schema.json +++ b/components/envoy-configs/values.schema.json @@ -27,6 +27,48 @@ "serviceAnnotations": { "type": "object", "description": "Annotations to be placed on the Service generated for this gateway" + }, + "externalTrafficPolicy": { + "type": "string", + "description": "External traffic policy for the gateway service", + "enum": ["Cluster", "Local"] + }, + "envoyDeployment": { + "type": "object", + "description": "Configuration for the Envoy proxy deployment pods", + "properties": { + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of Envoy proxy pod replicas" + }, + "container": { + "type": "object", + "description": "Container-level configuration for the Envoy proxy", + "properties": { + "resources": { + "type": "object", + "description": "Resource requests and limits for the Envoy proxy container", + "properties": { + "requests": { + "type": "object", + "properties": { + "cpu": { "type": "string" }, + "memory": { "type": "string" } + } + }, + "limits": { + "type": "object", + "properties": { + "cpu": { "type": "string" }, + "memory": { "type": "string" } + } + } + } + } + } + } + } } }, "required": [ @@ -55,6 +97,48 @@ "serviceAnnotations": { "type": "object", "description": "Annotations to be placed on the Service generated for this gateway" + }, + "externalTrafficPolicy": { + "type": "string", + "description": "External traffic policy for the gateway service", + "enum": ["Cluster", "Local"] + }, + "envoyDeployment": { + "type": "object", + "description": "Configuration for the Envoy proxy deployment pods", + "properties": { + "replicas": { + "type": "integer", + "minimum": 1, + "description": "Number of Envoy proxy pod replicas" + }, + "container": { + "type": "object", + "description": "Container-level configuration for the Envoy proxy", + "properties": { + "resources": { + "type": "object", + "description": "Resource requests and limits for the Envoy proxy container", + "properties": { + "requests": { + "type": "object", + "properties": { + "cpu": { "type": "string" }, + "memory": { "type": "string" } + } + }, + "limits": { + "type": "object", + "properties": { + "cpu": { "type": "string" }, + "memory": { "type": "string" } + } + } + } + } + } + } + } } }, "required": [ diff --git a/components/nova/values.yaml b/components/nova/values.yaml index ba0b491e6..65ad3628f 100644 --- a/components/nova/values.yaml +++ b/components/nova/values.yaml @@ -95,8 +95,15 @@ conf: - ServerGroupAffinityFilter - JsonFilter nova_api_uwsgi: + # JIRA:PUC-2007 - tuning the osapi to survive bursts of concurrent requests. + # Under load the default 2 uWSGI processes + 100-deep listen queue filled up, + # causing connection refusals and liveness probe failures (crash loop). uwsgi: - processes: 2 + # more worker processes to serve concurrent requests + processes: 8 + # deeper listen backlog so bursts queue instead of getting refused. + # NOTE: values above the node's net.core.somaxconn are silently capped. + listen: 1024 # Enable oslo.messaging notifications for Argo Events integration oslo_messaging_notifications: @@ -205,11 +212,38 @@ pod: # this should be set to no more than (pod.replicas.osapi - 1) # usually set on per-deployment basis. min_available: 0 + # JIRA:PUC-2007 - loosen the osapi liveness probe so a slow response during a + # burst of load doesn't trigger a destructive pod restart. A liveness probe + # should detect a dead process, not a busy one. Readiness failing under load + # is fine (pulls the pod from rotation briefly); liveness failing restarts it. + probes: + api: + default: + liveness: + enabled: true + params: + initialDelaySeconds: 30 + periodSeconds: 15 + timeoutSeconds: 10 + failureThreshold: 6 + readiness: + enabled: true + params: + initialDelaySeconds: 15 + periodSeconds: 10 + timeoutSeconds: 10 + failureThreshold: 3 resources: enabled: true api: + # JIRA:PUC-2007 - raise osapi resources. Heavy all_tenants queries with 8 + # uWSGI workers need more headroom than the default 2Gi limit / 100m request. requests: - memory: "256Mi" + cpu: "500m" + memory: "512Mi" + limits: + cpu: "4" + memory: "2Gi" conductor: requests: memory: "256Mi"