From 7c00ce5f30166c656a61573e2ad29f591471c3e8 Mon Sep 17 00:00:00 2001 From: Florian Ruynat Date: Mon, 11 May 2020 12:55:50 +0200 Subject: [PATCH] Update metrics-server tag and template (#6090) --- roles/download/defaults/main.yml | 2 +- .../metrics-server-deployment.yaml.j2 | 2 ++ .../templates/resource-reader.yaml.j2 | 32 +++++++------------ 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/roles/download/defaults/main.yml b/roles/download/defaults/main.yml index b987cbfd3..601696d3b 100644 --- a/roles/download/defaults/main.yml +++ b/roles/download/defaults/main.yml @@ -417,7 +417,7 @@ registry_image_repo: "{{ docker_image_repo }}/library/registry" registry_image_tag: "2.7" registry_proxy_image_repo: "{{ kube_image_repo }}/kube-registry-proxy" registry_proxy_image_tag: "0.4" -metrics_server_version: "v0.3.6" +metrics_server_version: "v0.3.7" metrics_server_image_repo: "{{ kube_image_repo }}/metrics-server-{{ image_arch }}" metrics_server_image_tag: "{{ metrics_server_version }}" local_volume_provisioner_image_repo: "{{ quay_image_repo }}/external_storage/local-volume-provisioner" diff --git a/roles/kubernetes-apps/metrics_server/templates/metrics-server-deployment.yaml.j2 b/roles/kubernetes-apps/metrics_server/templates/metrics-server-deployment.yaml.j2 index 733918bc5..f08113d8d 100644 --- a/roles/kubernetes-apps/metrics_server/templates/metrics-server-deployment.yaml.j2 +++ b/roles/kubernetes-apps/metrics_server/templates/metrics-server-deployment.yaml.j2 @@ -27,6 +27,7 @@ spec: containers: - name: metrics-server image: {{ metrics_server_image_repo }}:{{ metrics_server_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} command: - /metrics-server - --logtostderr @@ -74,6 +75,7 @@ spec: runAsUser: 10001 - name: metrics-server-nanny image: {{ addon_resizer_image_repo }}:{{ addon_resizer_image_tag }} + imagePullPolicy: {{ k8s_image_pull_policy }} resources: limits: cpu: {{ addon_resizer_limits_cpu }} diff --git a/roles/kubernetes-apps/metrics_server/templates/resource-reader.yaml.j2 b/roles/kubernetes-apps/metrics_server/templates/resource-reader.yaml.j2 index 9f7bc7f38..c3e085c72 100644 --- a/roles/kubernetes-apps/metrics_server/templates/resource-reader.yaml.j2 +++ b/roles/kubernetes-apps/metrics_server/templates/resource-reader.yaml.j2 @@ -5,23 +5,15 @@ metadata: labels: addonmanager.kubernetes.io/mode: Reconcile rules: -- apiGroups: - - "" - resources: - - pods - - nodes - - nodes/stats - - namespaces - verbs: - - get - - list - - watch -- apiGroups: - - "apps" - resources: - - deployments - verbs: - - get - - list - - update - - watch + - apiGroups: + - "" + resources: + - pods + - nodes + - nodes/stats + - namespaces + - configmaps + verbs: + - get + - list + - watch