Skip to content

Commit

Permalink
make pod affinity a hard requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
funkypenguin committed Dec 14, 2024
1 parent 772495c commit 0ec8be3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 47 deletions.
2 changes: 1 addition & 1 deletion charts/myprecious/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.207.1-pre-02
version: 1.207.1-pre-03

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/myprecious/templates/deployment-nodefinder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:
resources:
requests:
cpu: "500m"
memory: 500Mi
memory: 4Gi
limits:
cpu: "2"
memory: 4Gi
Expand Down
59 changes: 14 additions & 45 deletions charts/myprecious/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,56 +114,25 @@ tooling_image: &tooling_image ghcr.io/elfhosted/tooling:focal-20240530@sha256:45
# all RD pods have to exist with zurg - make this soft for now
standard_affinity: &standard_affinity
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 50
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.elfhosted.com/role
operator: In
values:
- nodefinder # use nodefinder in the absense of zurg...
topologyKey: "kubernetes.io/hostname"
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.elfhosted.com/name
operator: In
values:
- zurg # .. but prefer zurg
topologyKey: "kubernetes.io/hostname"
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.elfhosted.com/role
operator: In
values:
- nodefinder # use nodefinder in the absence of zurg...
topologyKey: "kubernetes.io/hostname"

dedicated_affinity: &dedicated_affinity
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference: # prefer a particular class of node
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: node-role.elfhosted.com/dedicated
- key: app.elfhosted.com/role
operator: In
values:
- "true"
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 50
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.elfhosted.com/role
operator: In
values:
- nodefinder # use nodefinder in the absense of zurg...
topologyKey: "kubernetes.io/hostname"
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.elfhosted.com/name
operator: In
values:
- zurg # .. but prefer zurg
topologyKey: "kubernetes.io/hostname"
- nodefinder # use nodefinder in the absence of zurg...
topologyKey: "kubernetes.io/hostname"

standard_tolerations: &standard_tolerations
# not using tolerations anymore
Expand Down

0 comments on commit 0ec8be3

Please sign in to comment.