Skip to content

Commit

Permalink
Merge pull request #239 from aslafy-z/patch-2
Browse files Browse the repository at this point in the history
feat: add topologySpreadConstraints
  • Loading branch information
rasheedamir authored Apr 1, 2023
2 parents 21b09cc + 5b22667 commit 398397a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

All notable changes to this project will be documented here.

### v2.2.0
- Feature: Add topologySpreadConstraints [PR-239](https://github.com/stakater/application/pull/239)

### v2.1.9
- Fix: Make servicePort var override possible with ingress hosts [PR-243](https://github.com/stakater/application/pull/243)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ To uninstall the chart:
| deployment.args | Arg for primary container of deployment | `[]` |
| deployment.tolerations | Taint tolerations for nodes | `[]` |
| deployment.affinity | Affinity for pod/node | `[]` |
| deployment.topologySpreadConstraints| Topology spread constraints definitions | `[]` |
| deployment.ports | Ports for primary container | `[]` |
| deployment.securityContext | Security Context for the pod | `{}` |
| deployment.additionalContainers | Add additional containers besides init and app containers | `[]` |
Expand Down
4 changes: 4 additions & 0 deletions application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ spec:
affinity:
{{ toYaml .Values.deployment.affinity | indent 8 -}}
{{- end }}
{{- with .Values.deployment.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.deployment.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.deployment.imagePullSecrets }}
Expand Down
21 changes: 21 additions & 0 deletions application/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,27 @@ deployment:
# values:
# - ssd

# Topology spread constraints
topologySpreadConstraints:
# - maxSkew: 1
# topologyKey: kubernetes.io/hostname
# whenUnsatisfiable: ScheduleAnyway
# labelSelector:
# matchExpressions:
# - key: disktype
# operator: In
# values:
# - ssd
# - maxSkew: 1
# topologyKey: topology.kubernetes.io/zone
# whenUnsatisfiable: ScheduleAnyway
# labelSelector:
# matchExpressions:
# - key: disktype
# operator: In
# values:
# - ssd

# Image of the app container
image:
repository: repository/image-name
Expand Down

0 comments on commit 398397a

Please sign in to comment.