[stable/cluster-autoscaler] Add PDB (#4398)

* [stable/cluster-autoscaler] Add PDB

* [stable/cluster-autoscaler] Add missing Chart.yml meta

* Make maxUnavailable configurable

* Add labels and make configuration more robust

* Bump version for new feature

* Fixup readme

* Make pbb values a string to make it easier to switch off the default
This commit is contained in:
Corey O'Brien
2018-04-19 10:47:59 -07:00
committed by k8s-ci-robot
parent e6cc219825
commit b0df5fc2c3
4 changed files with 23 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
description: Scales worker nodes within autoscaling groups.
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
name: cluster-autoscaler
version: 0.5.3
version: 0.6.0
appVersion: 1.1.0
home: https://github.com/kubernetes/autoscaler
sources:
+1
View File
@@ -84,6 +84,7 @@ Parameter | Description | Default
`image.tag` | Image tag (used if `cloudProvider=aws`) | `v1.1.0`
`image.pullPolicy` | Image pull policy (used if `cloudProvider=aws`) | `IfNotPresent`
`extraArgs` | additional container arguments | `{}`
`podDisruptionBudget` | Pod disruption budget | `maxUnavailable: 1`
`extraEnv` | additional container environment variables | `{}`
`nodeSelector` | node labels for pod assignment | `{}`
`podAnnotations` | annotations to add to each pod | `{}`
@@ -0,0 +1,17 @@
{{- if .Values.podDisruptionBudget -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
labels:
app: {{ template "cluster-autoscaler.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "cluster-autoscaler.fullname" . }}
spec:
selector:
matchLabels:
app: {{ template "cluster-autoscaler.name" . }}
release: {{ .Release.Name }}
{{ .Values.podDisruptionBudget | indent 2 }}
{{- end -}}
+4
View File
@@ -39,6 +39,10 @@ extraArgs: {}
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
## affinity: {}
podDisruptionBudget: |
maxUnavailable: 1
# minAvailable: 2
## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
nodeSelector: {}