Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm chart: Support providing RollingUpdate maxSurge and maxUnavailab… #5665

Merged
merged 6 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changesets/feat_helm_rollingupdate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Support providing RollingUpdate maxSurge and maxUnavailable values ([Issue #5664](https://github.com/apollographql/router/issues/5664))

RollingUpdate maxSurge and maxUnavailable are commonly used deployment configuration values. This change makes their
values able to be set via the router helm chart.

By [Jon Christiansen](https://github.com/theJC) in https://github.com/apollographql/router/pull/5665
10 changes: 10 additions & 0 deletions helm/chart/router/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,13 @@ spec:
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.rollingUpdate }}
strategy:
rollingUpdate:
{{- if (hasKey .Values.rollingUpdate "maxUnavailable") }}
maxUnavailable: {{ .Values.rollingUpdate.maxUnavailable }}
{{- end }}
{{- if (hasKey .Values.rollingUpdate "maxSurge") }}
maxSurge: {{ .Values.rollingUpdate.maxSurge }}
{{- end }}
{{- end }}
7 changes: 7 additions & 0 deletions helm/chart/router/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,13 @@ autoscaling:
# type: cpu
# targetUtilizationPercentage: 75

# -- Sets the [rolling update strategy parameters](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment). Can take absolute values or % values.
rollingUpdate:
{}
# Defaults if not set are:
# maxUnavailable: 25%
# maxSurge: 25%

nodeSelector: {}

tolerations: []
Expand Down
Loading