diff --git a/stable/metrics-server/Chart.yaml b/stable/metrics-server/Chart.yaml index 7508b21b05a8..52c8421b5837 100755 --- a/stable/metrics-server/Chart.yaml +++ b/stable/metrics-server/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 0.3.2 description: Metrics Server is a cluster-wide aggregator of resource usage data. name: metrics-server -version: 2.6.0 +version: 2.7.0 keywords: - metrics-server home: https://github.com/kubernetes-incubator/metrics-server diff --git a/stable/metrics-server/README.md b/stable/metrics-server/README.md index ce8f0af6e3ae..31f9bc9230cf 100644 --- a/stable/metrics-server/README.md +++ b/stable/metrics-server/README.md @@ -31,3 +31,6 @@ Parameter | Description | Default `service.annotations` | Annotations to add to the service | `{}` `service.port` | Service port to expose | `443` `service.type` | Type of service to create | `ClusterIP` +`podDisruptionBudget.enabled` | Create a PodDisruptionBudget | `false` +`podDisruptionBudget.minAvailable` | Minimum available instances; ignored if there is no PodDisruptionBudget | `1` +`podDisruptionBudget.maxUnavailable` | Maximum unavailable instances; ignored if there is no PodDisruptionBudget | `1` diff --git a/stable/metrics-server/templates/pdb.yaml b/stable/metrics-server/templates/pdb.yaml new file mode 100644 index 000000000000..3831097d9d3f --- /dev/null +++ b/stable/metrics-server/templates/pdb.yaml @@ -0,0 +1,23 @@ +{{- if .Values.podDisruptionBudget.enabled -}} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + labels: + app: {{ template "metrics-server.name" . }} + chart: {{ template "metrics-server.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + name: {{ template "metrics-server.fullname" . }} + namespace: {{ .Release.Namespace }} + +spec: + {{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + {{- end }} + selector: + matchLabels: + app: {{ template "metrics-server.name" . }} +{{- end -}} \ No newline at end of file diff --git a/stable/metrics-server/values.yaml b/stable/metrics-server/values.yaml index abda44e572bf..a7c8c702bee4 100644 --- a/stable/metrics-server/values.yaml +++ b/stable/metrics-server/values.yaml @@ -90,3 +90,9 @@ service: annotations: {} port: 443 type: ClusterIP + +podDisruptionBudget: + # https://kubernetes.io/docs/tasks/run-application/configure-pdb/ + enabled: false + minAvailable: 1 + maxUnavailable: 1