From 64e38717dd3284e7852de5abfda1dacde45dddb3 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Fri, 5 Oct 2018 09:47:03 +0800 Subject: [PATCH] update metrics-server v0.3.1 --- down/offline_images | 4 ++-- .../metrics-server-deployment.yaml | 16 +++++++++++++--- roles/cluster-addon/defaults/main.yml | 4 ++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/down/offline_images b/down/offline_images index 664b68d..9cfa21e 100644 --- a/down/offline_images +++ b/down/offline_images @@ -1,11 +1,11 @@ ###---[basic_images ] # dns-addon -coredns/coredns:1.1.3 +coredns/coredns:1.2.2 mirrorgooglecontainers/k8s-dns-kube-dns-amd64:1.14.10 mirrorgooglecontainers/k8s-dns-dnsmasq-nanny-amd64:1.14.10 mirrorgooglecontainers/k8s-dns-sidecar-amd64:1.14.10 # metrics-server -mirrorgooglecontainers/metrics-server-amd64:v0.2.1 +mirrorgooglecontainers/metrics-server-amd64:v0.3.1 # calico calico/node:v3.1.3 calico/cni:v3.1.3 diff --git a/manifests/metrics-server/metrics-server-deployment.yaml b/manifests/metrics-server/metrics-server-deployment.yaml index 40255fc..7457a41 100644 --- a/manifests/metrics-server/metrics-server-deployment.yaml +++ b/manifests/metrics-server/metrics-server-deployment.yaml @@ -23,11 +23,21 @@ spec: k8s-app: metrics-server spec: serviceAccountName: metrics-server + volumes: + # mount in tmp so we can safely use from-scratch images and/or read-only containers + - name: tmp-dir + emptyDir: {} containers: - name: metrics-server - #image: gcr.io/google_containers/metrics-server-amd64:v0.2.1 - image: mirrorgooglecontainers/metrics-server-amd64:v0.2.1 + #image: k8s.gcr.io/metrics-server-amd64:v0.3.0 + image: mirrorgooglecontainers/metrics-server-amd64:v0.3.1 imagePullPolicy: IfNotPresent command: - /metrics-server - - --source=kubernetes.summary_api:'' + - --metric-resolution=30s + - --kubelet-port=10255 + - --deprecated-kubelet-completely-insecure=true + volumeMounts: + - name: tmp-dir + mountPath: /tmp + diff --git a/roles/cluster-addon/defaults/main.yml b/roles/cluster-addon/defaults/main.yml index f38534d..65add32 100644 --- a/roles/cluster-addon/defaults/main.yml +++ b/roles/cluster-addon/defaults/main.yml @@ -2,7 +2,7 @@ dns_install: "yes" dns_backend: "coredns" kubedns_offline: "kubedns_1.14.10.tar" -coredns_offline: "coredns_1.1.3.tar" +coredns_offline: "coredns_1.2.2.tar" dns_offline: "{%- if dns_backend == 'coredns' -%} \ {{ coredns_offline }} \ {%- else -%} \ @@ -11,7 +11,7 @@ dns_offline: "{%- if dns_backend == 'coredns' -%} \ # metric server 自动安装 metricsserver_install: "yes" -metricsserver_offline: "metrics-server_v0.2.1.tar" +metricsserver_offline: "metrics-server_v0.3.1.tar" # dashboard 自动安装 dashboard_install: "yes"