Skip to content

Commit

Permalink
add pod anti affinity rules to activator component (#15259)
Browse files Browse the repository at this point in the history
Co-authored-by: Izabela Gomes <[email protected]>
  • Loading branch information
knative-prow-robot and izabelacg committed May 27, 2024
1 parent 5580224 commit 59626f8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions config/core/deployments/activator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ spec:
app.kubernetes.io/name: knative-serving
app.kubernetes.io/version: devel
spec:
# To avoid node becoming SPOF, spread our replicas to different nodes.
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app: activator
topologyKey: kubernetes.io/hostname
weight: 100

serviceAccountName: activator
containers:
- name: activator
Expand Down

0 comments on commit 59626f8

Please sign in to comment.