Add PodDisruptionBudgets to control plane (#5398) (#5406)

Closes #5398

* Add PodDisruptionBudget to controller deployments
* Add .yaml to editorconfig

Signed-off-by: Raphael Taylor-Davies <r.taylordavies@googlemail.com>
This commit is contained in:
Raphael Taylor-Davies 2021-01-06 14:19:15 +00:00 committed by GitHub
parent df84a08ac8
commit c9d789156c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 493 additions and 0 deletions

View File

@ -29,6 +29,9 @@ indent_style = space
[*.yml]
indent_size = 2
[*.yaml]
indent_size = 2
[*.proto]
indent_size = 2
indent_style = space

View File

@ -21,6 +21,24 @@ spec:
- name: http
port: 8085
targetPort: 8085
{{- if .Values.enablePodAntiAffinity }}
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-controller-api
namespace: {{.Values.global.namespace}}
labels:
{{.Values.global.controllerComponentLabel}}: controller
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}}
annotations:
{{.Values.global.createdByAnnotation}}: {{default (printf "linkerd/helm %s" .Values.global.linkerdVersion) .Values.global.cliVersion}}
spec:
maxUnavailable: 1
selector:
matchLabels:
{{.Values.global.controllerComponentLabel}}: controller
{{- end }}
---
{{- $tree := deepCopy . }}
{{ $_ := set $tree.Values.global.proxy "workloadKind" "deployment" -}}

View File

@ -40,6 +40,24 @@ spec:
- name: grpc
port: 8086
targetPort: 8086
{{- if .Values.enablePodAntiAffinity }}
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-dst
namespace: {{.Values.global.namespace}}
labels:
{{.Values.global.controllerComponentLabel}}: destination
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}}
annotations:
{{.Values.global.createdByAnnotation}}: {{default (printf "linkerd/helm %s" .Values.global.linkerdVersion) .Values.global.cliVersion}}
spec:
maxUnavailable: 1
selector:
matchLabels:
{{.Values.global.controllerComponentLabel}}: destination
{{- end }}
---
{{- $tree := deepCopy . }}
{{ $_ := set $tree.Values.global.proxy "workloadKind" "deployment" -}}

View File

@ -60,6 +60,24 @@ spec:
- name: grpc
port: 8080
targetPort: 8080
{{- if .Values.enablePodAntiAffinity }}
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-identity
namespace: {{.Values.global.namespace}}
labels:
{{.Values.global.controllerComponentLabel}}: identity
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}}
annotations:
{{.Values.global.createdByAnnotation}}: {{default (printf "linkerd/helm %s" .Values.global.linkerdVersion) .Values.global.cliVersion}}
spec:
maxUnavailable: 1
selector:
matchLabels:
{{.Values.global.controllerComponentLabel}}: identity
{{- end }}
---
{{- $tree := deepCopy . }}
{{ $_ := set $tree.Values.global.proxy "workloadKind" "deployment" -}}

View File

@ -127,3 +127,21 @@ spec:
- name: proxy-injector
port: 443
targetPort: proxy-injector
{{- if .Values.enablePodAntiAffinity }}
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-proxy-injector
namespace: {{.Values.global.namespace}}
labels:
{{.Values.global.controllerComponentLabel}}: proxy-injector
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}}
annotations:
{{.Values.global.createdByAnnotation}}: {{default (printf "linkerd/helm %s" .Values.global.linkerdVersion) .Values.global.cliVersion}}
spec:
maxUnavailable: 1
selector:
matchLabels:
{{.Values.global.controllerComponentLabel}}: proxy-injector
{{- end }}

View File

@ -21,6 +21,24 @@ spec:
- name: sp-validator
port: 443
targetPort: sp-validator
{{- if .Values.enablePodAntiAffinity }}
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-sp-validator
namespace: {{.Values.global.namespace}}
labels:
{{.Values.global.controllerComponentLabel}}: sp-validator
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}}
annotations:
{{.Values.global.createdByAnnotation}}: {{default (printf "linkerd/helm %s" .Values.global.linkerdVersion) .Values.global.cliVersion}}
spec:
maxUnavailable: 1
selector:
matchLabels:
{{.Values.global.controllerComponentLabel}}: sp-validator
{{- end }}
---
{{- $tree := deepCopy . }}
{{ $_ := set $tree.Values.global.proxy "workloadKind" "deployment" -}}

View File

@ -809,6 +809,22 @@ spec:
port: 8080
targetPort: 8080
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-identity
namespace: linkerd
labels:
linkerd.io/control-plane-component: identity
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/cli dev-undefined
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: identity
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1081,6 +1097,22 @@ spec:
port: 8085
targetPort: 8085
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-controller-api
namespace: linkerd
labels:
linkerd.io/control-plane-component: controller
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/cli dev-undefined
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: controller
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1364,6 +1396,22 @@ spec:
port: 8086
targetPort: 8086
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-dst
namespace: linkerd
labels:
linkerd.io/control-plane-component: destination
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/cli dev-undefined
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: destination
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1930,6 +1978,22 @@ spec:
port: 443
targetPort: proxy-injector
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-proxy-injector
namespace: linkerd
labels:
linkerd.io/control-plane-component: proxy-injector
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/cli dev-undefined
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: proxy-injector
---
###
### Service Profile Validator
###
@ -1953,6 +2017,22 @@ spec:
port: 443
targetPort: sp-validator
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-sp-validator
namespace: linkerd
labels:
linkerd.io/control-plane-component: sp-validator
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/cli dev-undefined
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: sp-validator
---
apiVersion: apps/v1
kind: Deployment
metadata:

View File

@ -809,6 +809,22 @@ spec:
port: 8080
targetPort: 8080
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-identity
namespace: linkerd
labels:
linkerd.io/control-plane-component: identity
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/cli dev-undefined
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: identity
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1081,6 +1097,22 @@ spec:
port: 8085
targetPort: 8085
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-controller-api
namespace: linkerd
labels:
linkerd.io/control-plane-component: controller
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/cli dev-undefined
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: controller
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1364,6 +1396,22 @@ spec:
port: 8086
targetPort: 8086
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-dst
namespace: linkerd
labels:
linkerd.io/control-plane-component: destination
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/cli dev-undefined
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: destination
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1930,6 +1978,22 @@ spec:
port: 443
targetPort: proxy-injector
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-proxy-injector
namespace: linkerd
labels:
linkerd.io/control-plane-component: proxy-injector
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/cli dev-undefined
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: proxy-injector
---
###
### Service Profile Validator
###
@ -1953,6 +2017,22 @@ spec:
port: 443
targetPort: sp-validator
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-sp-validator
namespace: linkerd
labels:
linkerd.io/control-plane-component: sp-validator
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/cli dev-undefined
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: sp-validator
---
apiVersion: apps/v1
kind: Deployment
metadata:

View File

@ -813,6 +813,22 @@ spec:
port: 8080
targetPort: 8080
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-identity
namespace: linkerd
labels:
linkerd.io/control-plane-component: identity
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: identity
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1076,6 +1092,22 @@ spec:
port: 8085
targetPort: 8085
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-controller-api
namespace: linkerd
labels:
linkerd.io/control-plane-component: controller
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: controller
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1350,6 +1382,22 @@ spec:
port: 8086
targetPort: 8086
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-dst
namespace: linkerd
labels:
linkerd.io/control-plane-component: destination
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: destination
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1898,6 +1946,22 @@ spec:
port: 443
targetPort: proxy-injector
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-proxy-injector
namespace: linkerd
labels:
linkerd.io/control-plane-component: proxy-injector
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: proxy-injector
---
# Source: linkerd2/templates/sp-validator.yaml
---
###
@ -1923,6 +1987,22 @@ spec:
port: 443
targetPort: sp-validator
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-sp-validator
namespace: linkerd
labels:
linkerd.io/control-plane-component: sp-validator
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: sp-validator
---
apiVersion: apps/v1
kind: Deployment
metadata:

View File

@ -817,6 +817,22 @@ spec:
port: 8080
targetPort: 8080
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-identity
namespace: linkerd
labels:
linkerd.io/control-plane-component: identity
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: identity
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1084,6 +1100,22 @@ spec:
port: 8085
targetPort: 8085
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-controller-api
namespace: linkerd
labels:
linkerd.io/control-plane-component: controller
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: controller
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1362,6 +1394,22 @@ spec:
port: 8086
targetPort: 8086
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-dst
namespace: linkerd
labels:
linkerd.io/control-plane-component: destination
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: destination
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1922,6 +1970,22 @@ spec:
port: 443
targetPort: proxy-injector
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-proxy-injector
namespace: linkerd
labels:
linkerd.io/control-plane-component: proxy-injector
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: proxy-injector
---
# Source: linkerd2/templates/sp-validator.yaml
---
###
@ -1947,6 +2011,22 @@ spec:
port: 443
targetPort: sp-validator
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-sp-validator
namespace: linkerd
labels:
linkerd.io/control-plane-component: sp-validator
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: sp-validator
---
apiVersion: apps/v1
kind: Deployment
metadata:

View File

@ -813,6 +813,22 @@ spec:
port: 8080
targetPort: 8080
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-identity
namespace: linkerd
labels:
linkerd.io/control-plane-component: identity
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: identity
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1076,6 +1092,22 @@ spec:
port: 8085
targetPort: 8085
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-controller-api
namespace: linkerd
labels:
linkerd.io/control-plane-component: controller
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: controller
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1350,6 +1382,22 @@ spec:
port: 8086
targetPort: 8086
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-dst
namespace: linkerd
labels:
linkerd.io/control-plane-component: destination
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: destination
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -1898,6 +1946,22 @@ spec:
port: 443
targetPort: proxy-injector
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-proxy-injector
namespace: linkerd
labels:
linkerd.io/control-plane-component: proxy-injector
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: proxy-injector
---
# Source: linkerd2/templates/sp-validator.yaml
---
###
@ -1923,6 +1987,22 @@ spec:
port: 443
targetPort: sp-validator
---
kind: PodDisruptionBudget
apiVersion: policy/v1beta1
metadata:
name: linkerd-sp-validator
namespace: linkerd
labels:
linkerd.io/control-plane-component: sp-validator
linkerd.io/control-plane-ns: linkerd
annotations:
linkerd.io/created-by: linkerd/helm linkerd-version
spec:
maxUnavailable: 1
selector:
matchLabels:
linkerd.io/control-plane-component: sp-validator
---
apiVersion: apps/v1
kind: Deployment
metadata: