Add rolling update strategy to multi-replica pods (#4267)

This introduces a rolling update strategy to Linkerd deployments that have
three replicas during HA deployments. This allows for at most one pod to begin
terminating before a new pod ready is ready.

This allows for upgrades to take place on three node clusters. As a pod begins
terminating, it opens up the node for the new pod to start initializing.

`.Values.enablePodAntiAffinity` was chosen as the conditional here because it
is set by the `values-ha.yaml` config on HA deployments
This commit is contained in:
Kevin Leimkuhler 2020-04-16 16:49:11 -07:00 committed by GitHub
parent 8e56166774
commit b13e2442b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 0 deletions

View File

@ -45,6 +45,11 @@ spec:
{{.Values.global.controllerComponentLabel}}: controller
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}}
{{- include "partials.proxy.labels" .Values.global.proxy | nindent 6}}
{{- if .Values.enablePodAntiAffinity }}
strategy:
rollingUpdate:
maxUnavailable: 1
{{- end }}
template:
metadata:
annotations:

View File

@ -45,6 +45,11 @@ spec:
{{.Values.global.controllerComponentLabel}}: destination
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}}
{{- include "partials.proxy.labels" .Values.global.proxy | nindent 6}}
{{- if .Values.enablePodAntiAffinity }}
strategy:
rollingUpdate:
maxUnavailable: 1
{{- end }}
template:
metadata:
annotations:

View File

@ -65,6 +65,11 @@ spec:
{{.Values.global.controllerComponentLabel}}: identity
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}}
{{- include "partials.proxy.labels" .Values.global.proxy | nindent 6}}
{{- if .Values.enablePodAntiAffinity }}
strategy:
rollingUpdate:
maxUnavailable: 1
{{- end }}
template:
metadata:
annotations:

View File

@ -24,6 +24,11 @@ spec:
selector:
matchLabels:
{{.Values.global.controllerComponentLabel}}: proxy-injector
{{- if .Values.enablePodAntiAffinity }}
strategy:
rollingUpdate:
maxUnavailable: 1
{{- end }}
template:
metadata:
annotations:

View File

@ -43,6 +43,11 @@ spec:
selector:
matchLabels:
{{.Values.global.controllerComponentLabel}}: sp-validator
{{- if .Values.enablePodAntiAffinity }}
strategy:
rollingUpdate:
maxUnavailable: 1
{{- end }}
template:
metadata:
annotations:

View File

@ -48,6 +48,11 @@ spec:
{{.Values.global.controllerComponentLabel}}: tap
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}}
{{- include "partials.proxy.labels" .Values.global.proxy | nindent 6}}
{{- if .Values.enablePodAntiAffinity }}
strategy:
rollingUpdate:
maxUnavailable: 1
{{- end }}
template:
metadata:
annotations: