Skip to content

Commit

Permalink
Merge pull request #16 from WyriHaximusNet/enforce-each-pod-to-be-on-…
Browse files Browse the repository at this point in the history
…a-different-node

Enforce each pod to be on a different node
  • Loading branch information
WyriHaximus authored Jul 10, 2020
2 parents f8e68bf + 3e05630 commit 5c8d76a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ Opinionated helm chats for my personal projects, and OSS Projects that either do
* [`docker-hub-exporter`](https://hub.helm.sh/charts/wyrihaximusnet/docker-hub-exporter)
* [`redirect`](https://hub.helm.sh/charts/wyrihaximusnet/redirect)


## Opinionated decisions shared by all charts

* All have pod anti-affinity to be not be on the same node
2 changes: 1 addition & 1 deletion charts/docker-hub-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Docker Hub exporter
home: https://github.com/jessestuart/docker-hub-exporter
icon: https://helm.wyrihaximus.net/images/charts/docker-hub-exporter.png
type: application
version: 0.2.4
version: 0.3.0
appVersion: d05df48
maintainers:
- name: WyriHaximus
Expand Down
10 changes: 10 additions & 0 deletions charts/docker-hub-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,13 @@ spec:
args:
- -listen-address=:9170
- -organisations={{ .Values.organisations }}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- {{ include ".helm.fullname" . }}
topologyKey: "kubernetes.io/hostname"
2 changes: 1 addition & 1 deletion charts/redirect/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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.
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
1 change: 1 addition & 0 deletions charts/redirect/ci/single-replica-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
replicaCount: 1
10 changes: 10 additions & 0 deletions charts/redirect/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,13 @@ spec:
- name: {{ include ".helm.fullname" . }}-volume
configMap:
name: {{ include ".helm.fullname" . }}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- {{ include ".helm.fullname" . }}
topologyKey: "kubernetes.io/hostname"

0 comments on commit 5c8d76a

Please sign in to comment.