From 48164c12dadb14445f40092442632e1a88e0ef74 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Fri, 18 Apr 2025 16:33:10 +0800 Subject: [PATCH] feat: update nginx-ingress configuration - Add tolerations for restricted scheduling - Set externalTrafficPolicy to 'Local' These updates enhance the deployment configuration of the nginx-ingress. They allow better scheduling of pods on nodes with specific taints and facilitate the preservation of the client source IP for external traffic. --- nginx-ingress/vaules.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nginx-ingress/vaules.yaml b/nginx-ingress/vaules.yaml index 1a8525c..9a32292 100644 --- a/nginx-ingress/vaules.yaml +++ b/nginx-ingress/vaules.yaml @@ -250,7 +250,11 @@ controller: # -- Node tolerations for server scheduling to nodes with taints ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ ## - tolerations: [] + tolerations: + - key: "scheduling" + operator: "Equal" + value: "restricted" + effect: "NoSchedule" # - key: "key" # operator: "Equal|Exists" # value: "value" @@ -521,7 +525,7 @@ controller: # -- External traffic policy of the external controller service. Set to "Local" to preserve source IP on providers supporting it. # Ref: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip - externalTrafficPolicy: "" + externalTrafficPolicy: "Local" # -- Session affinity of the external controller service. Must be either "None" or "ClientIP" if set. Defaults to "None". # Ref: https://kubernetes.io/docs/reference/networking/virtual-ips/#session-affinity sessionAffinity: ""