Skip to content

Commit

Permalink
Merge pull request #100 from ColonelBundy/main
Browse files Browse the repository at this point in the history
Added support for topologySpreadConstraints & PDB apiVersion for 1.26
  • Loading branch information
FabianKramm authored Jan 2, 2024
2 parents cad3772 + e391957 commit 74984b1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ spec:
{{- if .Values.jspolicy.extraVolumes }}
volumes:
{{- toYaml .Values.jspolicy.extraVolumes | nindent 8 }}
{{- if .Values.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "jspolicy.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }}
containers:
- ports:
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.podDisruptionBudget.create }}
apiVersion: policy/v1
apiVersion: {{ .Values.podDisruptionBudget.apiVersion | default "policy/v1" }}
kind: PodDisruptionBudget
metadata:
name: jspolicy
Expand Down
9 changes: 9 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,22 @@ nodeSelector: {}
##
tolerations: []

## Topology spread constrains
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
##
topologySpreadConstraints: []

podDisruptionBudget:
## Specifies whether a Pod disruption budget should be created
##
create: false
minAvailable: 1
# maxUnavailable: 1

# Set apiversion for compatibility for kubernetes < 1.26
# default is policy/v1
apiVersion: null

# Create policies as part of the chart
# policies is a map:
# the key is the name of the policy
Expand Down

0 comments on commit 74984b1

Please sign in to comment.