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

had to ensure app and lfmerge run on same node #1434

Merged
merged 2 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docker/deployment/app-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ spec:
labels:
app: app
spec:
affinity:
# required to ensure this container makes it to lfmerge's dedicated node
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: dedicated
operator: In
values:
- lfmerge
weight: 1
# required to ensure this container makes it to lfmerge's dedicated node
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: lfmerge
volumes:
- name: assets
persistentVolumeClaim:
Expand Down
10 changes: 10 additions & 0 deletions docker/deployment/lfmerge-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ spec:
values:
- lfmerge
weight: 1
# need to keep this on the same pod as the app since inotify only gets notification wwhen updates occur on the same kernal
longrunningprocess marked this conversation as resolved.
Show resolved Hide resolved
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- app
topologyKey: kubernetes.io/hostname
# required to ensure this container makes it to a dedicated node (so it doesn't crash other containers when it blows up)
tolerations:
- effect: NoSchedule
Expand Down