From 30fdc4dcdb79d1f2513ebc2b6a9cd1fd9397f53e Mon Sep 17 00:00:00 2001 From: rohow Date: Wed, 22 Apr 2026 11:32:23 +0800 Subject: [PATCH] feat(kustomize): add node affinity for source-controller and update affinity for helm, kustomize, and notification controllers --- flux/flux-instance.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/flux/flux-instance.yaml b/flux/flux-instance.yaml index 3630091..7e10b4d 100644 --- a/flux/flux-instance.yaml +++ b/flux/flux-instance.yaml @@ -31,8 +31,26 @@ spec: name: flux kustomize: patches: + # source-controller 需要良好的国际网络环境,优先调度到网络较好的节点上 - target: kind: Deployment + name: (source-controller) + patch: | + - op: add + path: /spec/template/spec/affinity + value: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - clawjp + - target: + kind: Deployment + name: (helm-controller|kustomize-controller|notification-controller) patch: | - op: add path: /spec/template/spec/affinity