From d9531c5666335acb865a61884288125c79bf9fb2 Mon Sep 17 00:00:00 2001
From: groundhog2k <10630407+groundhog2k@users.noreply.github.com>
Date: Sat, 5 Dec 2020 14:26:30 +0100
Subject: [PATCH] Updated metric-server chart and version (#98)

* Updated metric-server chart and version

* Updated chart definition
---
 charts/metrics-server/Chart.yaml               | 18 ++++++++++++------
 charts/metrics-server/README.md                |  8 ++++----
 .../templates/metrics-server-deployment.yaml   |  2 +-
 charts/metrics-server/values.yaml              |  6 +++---
 4 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/charts/metrics-server/Chart.yaml b/charts/metrics-server/Chart.yaml
index 35d34f50..5cd3b48b 100644
--- a/charts/metrics-server/Chart.yaml
+++ b/charts/metrics-server/Chart.yaml
@@ -1,9 +1,15 @@
-apiVersion: v1
-appVersion: 0.3.6
-description: DEPRECATED - Metrics Server is a cluster-wide aggregator of resource usage data.
+apiVersion: v2
 name: metrics-server
-version: 2.11.4
-keywords:
-  - metrics-server
+description: A Helm chart for Kubernetes metrics-server
+
+type: application
+
 maintainers:
   - name: groundhog2k
+
+version: 2.12.0
+
+appVersion: "0.4.1"
+
+keywords:
+  - metrics-server
diff --git a/charts/metrics-server/README.md b/charts/metrics-server/README.md
index 2e61ffec..08b2ead8 100644
--- a/charts/metrics-server/README.md
+++ b/charts/metrics-server/README.md
@@ -1,6 +1,6 @@
 # metrics-server
 
-![Version: 2.11.4](https://img.shields.io/badge/Version-2.11.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.3.6](https://img.shields.io/badge/AppVersion-0.3.6-informational?style=flat-square)
+![Version: 2.12.0](https://img.shields.io/badge/Version-2.12.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.1](https://img.shields.io/badge/AppVersion-0.4.1-informational?style=flat-square)
 
 [Metrics Server](https://github.com/kubernetes-incubator/metrics-server) is a cluster-wide aggregator of resource usage data. Resource metrics are used by components like `kubectl top` and the [Horizontal Pod Autoscaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale) to scale workloads. To autoscale based upon a custom metric, see the [Prometheus Adapter chart](https://github.com/helm/charts/blob/master/stable/prometheus-adapter).
 
@@ -14,14 +14,14 @@ Parameter | Description | Default
 `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | ``
 `apiService.create` | Create the v1beta1.metrics.k8s.io API service | `true`
 `hostNetwork.enabled` | Enable hostNetwork mode | `false`
-`image.repository` | Image repository | `k8s.gcr.io/metrics-server-amd64`
-`image.tag` | Image tag | `v0.3.2`
+`image.repository` | Image repository | `k8s.gcr.io/metrics-server/metrics-server`
+`image.tag` | Image tag | `""`
 `image.pullPolicy` | Image pull policy | `IfNotPresent`
 `imagePullSecrets` | Image pull secrets | `[]`
 `args` | Command line arguments | `[]`
 `resources` | CPU/Memory resource requests/limits. | `{}`
 `tolerations` | List of node taints to tolerate (requires Kubernetes >=1.6) | `[]`
-`nodeSelector` | Node labels for pod assignment | `{}`
+`nodeSelector` | Node labels for pod assignment | `"amd64"`
 `affinity` | Node affinity | `{}`
 `replicas` | Number of replicas | `1`
 `extraVolumeMounts` | Ability to provide volume mounts to the pod | `[]`
diff --git a/charts/metrics-server/templates/metrics-server-deployment.yaml b/charts/metrics-server/templates/metrics-server-deployment.yaml
index 3158f41d..36494aef 100644
--- a/charts/metrics-server/templates/metrics-server-deployment.yaml
+++ b/charts/metrics-server/templates/metrics-server-deployment.yaml
@@ -47,7 +47,7 @@ spec:
         {{- ( tpl (toYaml .Values.extraContainers) . ) | nindent 8 }}
         {{- end }}
         - name: metrics-server
-          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
           imagePullPolicy: {{ .Values.image.pullPolicy }}
           command:
             - /metrics-server
diff --git a/charts/metrics-server/values.yaml b/charts/metrics-server/values.yaml
index 630479eb..ba508ccd 100644
--- a/charts/metrics-server/values.yaml
+++ b/charts/metrics-server/values.yaml
@@ -27,8 +27,7 @@ hostNetwork:
   enabled: false
 
 image:
-  repository: k8s.gcr.io/metrics-server-amd64
-  tag: v0.3.6
+  repository: k8s.gcr.io/metrics-server/metrics-server
   pullPolicy: IfNotPresent
 
 imagePullSecrets: []
@@ -40,7 +39,8 @@ args: []
 
 resources: {}
 
-nodeSelector: {}
+nodeSelector:
+  kubernetes.io/arch: amd64
 
 tolerations: []
 
-- 
GitLab