Skip to content

Commit

Permalink
Modify the pod scheduling of vpcdns (#2420)
Browse files Browse the repository at this point in the history
Co-authored-by: yl4811 <yl4811@yealink.com>
  • Loading branch information
ShaPoHun and yl4811 committed Mar 3, 2023
1 parent 83ab70f commit 9805070
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions yamls/coredns-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ spec:
kubernetes.io/os: linux
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values: ["{{ .DeployName }}"]
topologyKey: kubernetes.io/hostname
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: k8s-app
operator: In
values: ["{{ .DeployName }}"]
topologyKey: kubernetes.io/hostname
containers:
- name: coredns
image: {{ .CorednsImage }}
Expand Down

0 comments on commit 9805070

Please sign in to comment.