Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components that are eligible for leaderelection should use anti-affinity #1269

Closed
mattmoor opened this issue Apr 30, 2020 · 2 comments
Closed
Labels
area/API kind/feature lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@mattmoor
Copy link
Member

/area API
/kind feature
/kind good-first-issue

I noticed this in Contour's controller yaml, and I think it's probably a good pattern to follow:

      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: contour
              topologyKey: kubernetes.io/hostname
            weight: 100

Basically, if one of the HA scenarios you want to handle is disruptions due to node failures, then we should make sure that replicas of each component aren't scheduled on the same node as one another.

cc @pmorie for thoughts / alternatives
cc @lionelvillard @markusthoemmes @mgencur who have expressed interest in this space in other contexts FYI

@mattmoor
Copy link
Member Author

We should probably also consider PodDisruptionBudget, but AIUI those create problems for single-replica controllers because they can no longer receive updates(?).

cc @tcnghia who IIRC hit this with Istio

mattmoor added a commit to mattmoor/serving that referenced this issue Aug 6, 2020
mattmoor added a commit to mattmoor/eventing that referenced this issue Aug 6, 2020
mattmoor added a commit to mattmoor/sample-controller that referenced this issue Aug 6, 2020
mattmoor added a commit to mattmoor/sample-controller that referenced this issue Aug 6, 2020
mattmoor added a commit to mattmoor/sample-source that referenced this issue Aug 6, 2020
knative-prow-robot pushed a commit to knative-extensions/sample-controller that referenced this issue Aug 6, 2020
knative-prow-robot pushed a commit to knative-extensions/sample-source that referenced this issue Aug 6, 2020
knative-prow-robot pushed a commit to knative/eventing that referenced this issue Aug 6, 2020
knative-prow-robot pushed a commit to knative/serving that referenced this issue Aug 6, 2020
@github-actions
Copy link
Contributor

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API kind/feature lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

2 participants