Skip to content

Commit

Permalink
add pod anti affinity rules to activator component (#15233)
Browse files Browse the repository at this point in the history
  • Loading branch information
izabelacg authored May 23, 2024
1 parent a0a1ac7 commit 5ebffd5
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 5ebffd5

Please sign in to comment.