From 8ae76e6dcfbf9f855057ada2ee0cf987f4c0380f Mon Sep 17 00:00:00 2001 From: gjmzj Date: Sun, 27 Oct 2019 22:38:54 +0800 Subject: [PATCH] update metrics-server v0.3.6 --- manifests/metrics-server/auth-delegator.yaml | 4 +--- manifests/metrics-server/auth-reader.yaml | 4 +--- .../metrics-server/metrics-apiservice.yaml | 4 +--- .../metrics-server-deployment.yaml | 4 ++-- .../metrics-server/metrics-server-service.yaml | 6 +++--- manifests/metrics-server/resource-reader.yaml | 17 ++--------------- roles/cluster-addon/defaults/main.yml | 2 +- tools/easzup | 2 +- 8 files changed, 12 insertions(+), 31 deletions(-) diff --git a/manifests/metrics-server/auth-delegator.yaml b/manifests/metrics-server/auth-delegator.yaml index cbaa625..87909da 100644 --- a/manifests/metrics-server/auth-delegator.yaml +++ b/manifests/metrics-server/auth-delegator.yaml @@ -1,10 +1,8 @@ +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: metrics-server:system:auth-delegator - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/manifests/metrics-server/auth-reader.yaml b/manifests/metrics-server/auth-reader.yaml index 60da052..062afa8 100644 --- a/manifests/metrics-server/auth-reader.yaml +++ b/manifests/metrics-server/auth-reader.yaml @@ -1,11 +1,9 @@ +--- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: metrics-server-auth-reader namespace: kube-system - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile roleRef: apiGroup: rbac.authorization.k8s.io kind: Role diff --git a/manifests/metrics-server/metrics-apiservice.yaml b/manifests/metrics-server/metrics-apiservice.yaml index dc6da04..40e7bd8 100644 --- a/manifests/metrics-server/metrics-apiservice.yaml +++ b/manifests/metrics-server/metrics-apiservice.yaml @@ -1,10 +1,8 @@ +--- apiVersion: apiregistration.k8s.io/v1 kind: APIService metadata: name: v1beta1.metrics.k8s.io - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile spec: service: name: metrics-server diff --git a/manifests/metrics-server/metrics-server-deployment.yaml b/manifests/metrics-server/metrics-server-deployment.yaml index 526b118..65321d4 100644 --- a/manifests/metrics-server/metrics-server-deployment.yaml +++ b/manifests/metrics-server/metrics-server-deployment.yaml @@ -29,8 +29,8 @@ spec: emptyDir: {} containers: - name: metrics-server - #image: k8s.gcr.io/metrics-server-amd64:v0.3.4 - image: mirrorgooglecontainers/metrics-server-amd64:v0.3.4 + #image: k8s.gcr.io/metrics-server-amd64:v0.3.6 + image: mirrorgooglecontainers/metrics-server-amd64:v0.3.6 imagePullPolicy: IfNotPresent command: - /metrics-server diff --git a/manifests/metrics-server/metrics-server-service.yaml b/manifests/metrics-server/metrics-server-service.yaml index 3764c05..ddf6f4a 100644 --- a/manifests/metrics-server/metrics-server-service.yaml +++ b/manifests/metrics-server/metrics-server-service.yaml @@ -1,16 +1,16 @@ +--- apiVersion: v1 kind: Service metadata: name: metrics-server namespace: kube-system labels: - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/cluster-service: "true" kubernetes.io/name: "Metrics-server" + kubernetes.io/cluster-service: "true" spec: selector: k8s-app: metrics-server ports: - port: 443 protocol: TCP - targetPort: https + targetPort: 443 diff --git a/manifests/metrics-server/resource-reader.yaml b/manifests/metrics-server/resource-reader.yaml index d9bde13..ecafc80 100644 --- a/manifests/metrics-server/resource-reader.yaml +++ b/manifests/metrics-server/resource-reader.yaml @@ -1,38 +1,25 @@ +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: system:metrics-server - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: - "" resources: - pods - nodes + - nodes/stats - namespaces verbs: - get - list - watch -- apiGroups: - - "extensions" - resources: - - deployments - verbs: - - get - - list - - update - - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: system:metrics-server - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/roles/cluster-addon/defaults/main.yml b/roles/cluster-addon/defaults/main.yml index e2c4c05..d508a6b 100644 --- a/roles/cluster-addon/defaults/main.yml +++ b/roles/cluster-addon/defaults/main.yml @@ -15,7 +15,7 @@ dns_offline: "{%- if dns_backend == 'coredns' -%} \ # metric server 自动安装 metricsserver_install: "yes" -metricsVer: "v0.3.4" +metricsVer: "v0.3.6" metricsserver_offline: "metrics-server_{{ metricsVer }}.tar" # dashboard 自动安装 diff --git a/tools/easzup b/tools/easzup index d0f440c..3651fa3 100755 --- a/tools/easzup +++ b/tools/easzup @@ -187,7 +187,7 @@ function get_offline_image() { dashboardVer=v1.10.1 flannelVer=v0.11.0-amd64 heapsterVer=v1.5.4 - metricsVer=v0.3.4 + metricsVer=v0.3.6 pauseVer=3.1 traefikVer=v1.7.12