Skip to content

Commit

Permalink
feat: add topologySpreadConstraints
Browse files Browse the repository at this point in the history
  • Loading branch information
aslafy-z authored Mar 27, 2023
1 parent 7c7f797 commit 11ad9ee
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

All notable changes to this project will be documented here.

### v2.x [unreleased]

- Feat: Add topologySpreadConstraints [PR-239](https://github.com/stakater/application/pull/239)

### v2.1.2 && v2.1.3
- Update: Improve enable conditions by adding capabilites, use `_helpers.tpl` properly, Move to common k8s labels and remove other labels [PR-226](https://github.com/stakater/application/pull/226)
- Feature: Make `ingress` path configurable [PR-226](https://github.com/stakater/application/pull/226)
Expand Down
4 changes: 4 additions & 0 deletions application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ spec:
{{- if .Values.deployment.affinity }}
affinity:
{{ toYaml .Values.deployment.affinity | indent 8 -}}
{{- end }}
{{- if .Values.deployment.topologySpreadConstraints }}
topologySpreadConstraints:
{{ toYaml .Values.deployment.topologySpreadConstraints | indent 8 }}
{{- end }}
{{- if .Values.deployment.imagePullSecrets }}
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 11ad9ee

Please sign in to comment.