Repository navigation
Description
Description:
The
priorityClassNamefield defined inrateLimitDeployment.pod.priorityClassNamevia the EnvoyGateway config is not being applied to the rate limit pod.
Repro steps:
Install envoy gateway via helm chart -
helm upgrade --install eg oci://docker.io/envoyproxy/gateway-helm --version v1.8.1 -n envoy-gateway-system --create-namespace --skip-crds -f ./eg-config.yaml --set deployment.priorityClassName=<name>
eg-config.yaml
config:
envoyGateway:
gateway:
controllerName: "gateway.envoyproxy.io/gatewayclass-controller"
logging:
level:
default: "info"
provider:
kubernetes:
rateLimitDeployment:
pod:
priorityClassName: "<name>"
container:
image: "docker.io/envoyproxy/ratelimit:1e50889b"
patch:
type: "StrategicMerge"
value:
spec:
template:
spec:
containers:
- imagePullPolicy: "IfNotPresent"
name: "envoy-ratelimit"
image: "docker.io/envoyproxy/ratelimit:1e50889b"
env:
- name: REDIS_TYPE
value: "sentinel"
type: "Kubernetes"
extensionApis:
enableEnvoyPatchPolicy: true
enableBackend: true
extensionManager:
backendResources:
- group: inference.networking.k8s.io
kind: InferencePool
version: v1
hooks:
xdsTranslator:
translation:
listener:
includeAll: true
route:
includeAll: true
cluster:
includeAll: true
secret:
includeAll: true
post:
- "Translation"
- "Cluster"
- "Route"
service:
fqdn:
hostname: "<ai-gateway-controller-hostname>"
port: <port>
rateLimit:
backend:
type: "Redis"
redis:
url: "mymaster,<valkey-service-url>"
Root Cause (suspected)
In
internal/infrastructure/kubernetes/ratelimit/resource_provider.go, the rate limit Deployment() function constructs the PodSpec but does not include PriorityClassName, unlike the proxyresource_provider.gowhich does set it:
// ratelimit/resource_provider.go - PriorityClassName is MISSING here
Spec: corev1.PodSpec{
SecurityContext: r.rateLimitDeployment.Pod.SecurityContext,
Affinity: r.rateLimitDeployment.Pod.Affinity,
Tolerations: r.rateLimitDeployment.Pod.Tolerations,
NodeSelector: r.rateLimitDeployment.Pod.NodeSelector,
TopologySpreadConstraints: r.rateLimitDeployment.Pod.TopologySpreadConstraints,
// PriorityClassName is NOT set here
}
Whereas the proxy deployment does set it:
// proxy/resource_provider.go - PriorityClassName IS set
PriorityClassName: ptr.Deref(deploymentConfig.Pod.PriorityClassName, ""),
Expected Behavior
priorityClassNameset underrateLimitDeployment.pod.priorityClassNameshould be applied to the rate limit pod, consistent with how it works for the proxy deployment.
Actual Behavior
The
priorityClassNameis silently ignored for the rate limit pod.
Environment:
Helm chart version: v1.8.1
Gateway version: v1.8.1
Ratelimit tag: 1e50889b
Logs:
No related logs found in envoy
Activity
fix(ratelimit): apply priorityClassName to the rate limit pod (envoyp…
[release-1.8] cherrypick for v1.8.5 (#10126)
[release-1.9] cherrypick for v1.9.2 (#10128)