Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

feat: add anti affinity to coredns deployment #249

Merged
merged 1 commit into from Jan 9, 2019

Conversation

sylr
Copy link
Contributor

@sylr sylr commented Jan 8, 2019

Reason for Change:

Improve resilience of the coredns service with anti-affinity.

Those will try to spread coredns pods across failure-domain zones and nodes at scheduling.

See:

https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity

Issue Fixed:

Requirements:

Notes:

Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
@acs-bot acs-bot added the size/S label Jan 8, 2019
@jackfrancis jackfrancis added this to In progress in backlog Jan 8, 2019
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try to summarize what this is expressing. Is it:

"Don't schedule coredns pods onto a node that already has a kube-dns-labeled pod in the same availability zone."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, except it will only try, if it can't it will schedule both pods on the same node if no other is available.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks. Hence the preferredDuringSchedulingIgnoredDuringExecution instead of requiredDuringSchedulingIgnoredDuringExecution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly

@jackfrancis
Copy link
Member

This looks sane to me pending E2E. @mboersma or @CecileRobertMichon, would appreciate a 2nd opinion.

@CecileRobertMichon
Copy link
Contributor

/lgtm

@acs-bot
Copy link

acs-bot commented Jan 8, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, sylr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jackfrancis jackfrancis merged commit d21ecc8 into Azure:master Jan 9, 2019
backlog automation moved this from In progress to Done Jan 9, 2019
juhacket pushed a commit to juhacket/aks-engine that referenced this pull request Mar 14, 2019
@sylr sylr deleted the coredns-antiaffinity branch October 16, 2019 07:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
backlog
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants