From 3b9300f61ae965075d6889309af64e7d803afed3 Mon Sep 17 00:00:00 2001 From: Joffrey Janiec Date: Wed, 26 Feb 2020 19:45:20 +0100 Subject: [PATCH] [stable/metrics-server] Add podLabels support (#21068) Signed-off-by: Joffrey Janiec --- stable/metrics-server/Chart.yaml | 2 +- stable/metrics-server/README.md | 1 + stable/metrics-server/templates/metrics-server-deployment.yaml | 3 +++ stable/metrics-server/values.yaml | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stable/metrics-server/Chart.yaml b/stable/metrics-server/Chart.yaml index 93928d5671bc..d11d6203f247 100755 --- a/stable/metrics-server/Chart.yaml +++ b/stable/metrics-server/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 0.3.6 description: Metrics Server is a cluster-wide aggregator of resource usage data. name: metrics-server -version: 2.9.0 +version: 2.10.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 c5383271a4a7..5c6ca818edf7 100644 --- a/stable/metrics-server/README.md +++ b/stable/metrics-server/README.md @@ -25,6 +25,7 @@ Parameter | Description | Default `extraVolumeMounts` | Ability to provide volume mounts to the pod | `[]` `extraVolumes` | Ability to provide volumes to the pod | `[]` `livenessProbe` | Container liveness probe | See values.yaml +`podLabels` | Labels to be added to pods | `{}` `podAnnotations` | Annotations to be added to pods | `{}` `priorityClassName` | Pod priority class | `""` `readinessProbe` | Container readiness probe | See values.yaml diff --git a/stable/metrics-server/templates/metrics-server-deployment.yaml b/stable/metrics-server/templates/metrics-server-deployment.yaml index ae4f27cfdeb9..2c1a0c737afe 100644 --- a/stable/metrics-server/templates/metrics-server-deployment.yaml +++ b/stable/metrics-server/templates/metrics-server-deployment.yaml @@ -18,6 +18,9 @@ spec: labels: app: {{ template "metrics-server.name" . }} release: {{ .Release.Name }} + {{- if .Values.podLabels }} +{{ toYaml .Values.podLabels | indent 8 }} + {{- end }} {{- with .Values.podAnnotations }} annotations: {{- range $key, $value := . }} diff --git a/stable/metrics-server/values.yaml b/stable/metrics-server/values.yaml index 6890ba0d2510..ba752a35dfea 100644 --- a/stable/metrics-server/values.yaml +++ b/stable/metrics-server/values.yaml @@ -50,6 +50,8 @@ replicas: 1 extraContainers: [] +podLabels: {} + podAnnotations: {} # The following annotations guarantee scheduling for critical add-on pods. # See more at: https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/