Skip to content

Commit

Permalink
helm: Add pod affinity for cilium-envoy
Browse files Browse the repository at this point in the history
This commit is to avoid cilium-envoy running on the node without cilium
agent. Two main changes are:

- nodeAffinity to make sure that cilium-envoy will not be scheduled on
  node without cilium agent
- podAffinity with requiredDuringSchedulingIgnoredDuringExecution to
  cilium agent

Relates: #25081, #30034
Fixes: #31149
Signed-off-by: Tam Mach <tam.mach@cilium.io>
  • Loading branch information
sayboras authored and aanm committed Mar 13, 2024
1 parent 76c85c5 commit 44aeb53
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Documentation/helm-values.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion install/kubernetes/cilium/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions install/kubernetes/cilium/values.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions install/kubernetes/cilium/values.yaml.tmpl
Expand Up @@ -1936,6 +1936,20 @@ envoy:
labelSelector:
matchLabels:
k8s-app: cilium-envoy
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
k8s-app: cilium
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cilium.io/no-schedule
operator: NotIn
values:
- "true"
# -- Node selector for cilium-envoy.
nodeSelector:
kubernetes.io/os: linux
Expand Down

0 comments on commit 44aeb53

Please sign in to comment.