diff --git a/.changesets/feat_helm_rollingupdate.md b/.changesets/feat_helm_rollingupdate.md new file mode 100644 index 0000000000..b59d016fb0 --- /dev/null +++ b/.changesets/feat_helm_rollingupdate.md @@ -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 diff --git a/helm/chart/router/templates/deployment.yaml b/helm/chart/router/templates/deployment.yaml index d6af1a19b4..3268dd443e 100644 --- a/helm/chart/router/templates/deployment.yaml +++ b/helm/chart/router/templates/deployment.yaml @@ -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 }} diff --git a/helm/chart/router/values.yaml b/helm/chart/router/values.yaml index b90f46dc66..b4d437bb7c 100644 --- a/helm/chart/router/values.yaml +++ b/helm/chart/router/values.yaml @@ -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: []