Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

chore: bump metrics-server to v0.4.4 #4424

Merged
merged 1 commit into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 93 additions & 48 deletions parts/k8s/addons/metrics-server.yaml
Original file line number Diff line number Diff line change
@@ -1,68 +1,82 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: metrics-server
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
k8s-app: metrics-server
addonmanager.kubernetes.io/mode: {{GetMode}}
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: system:metrics-server
labels:
kubernetes.io/cluster-service: "true"
k8s-app: metrics-server
addonmanager.kubernetes.io/mode: {{GetMode}}
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-view: "true"
name: system:aggregated-metrics-reader
rules:
- apiGroups:
- ""
- metrics.k8s.io
resources:
- pods
- nodes
- nodes/stats
- namespaces
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
k8s-app: metrics-server
addonmanager.kubernetes.io/mode: {{GetMode}}
name: system:metrics-server
rules:
- apiGroups:
- "extensions"
- ""
resources:
- deployments
- pods
- nodes
- nodes/stats
- namespaces
- configmaps
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
kind: RoleBinding
metadata:
name: system:metrics-server
labels:
kubernetes.io/cluster-service: "true"
k8s-app: metrics-server
addonmanager.kubernetes.io/mode: {{GetMode}}
name: metrics-server-auth-reader
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:metrics-server
kind: Role
name: extension-apiserver-authentication-reader
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
kind: ClusterRoleBinding
metadata:
name: metrics-server-auth-reader
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
k8s-app: metrics-server
addonmanager.kubernetes.io/mode: {{GetMode}}
name: metrics-server:system:auth-delegator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: extension-apiserver-authentication-reader
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: metrics-server
Expand All @@ -71,14 +85,14 @@ subjects:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: metrics-server:system:auth-delegator
labels:
kubernetes.io/cluster-service: "true"
k8s-app: metrics-server
addonmanager.kubernetes.io/mode: {{GetMode}}
name: system:metrics-server
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
name: system:metrics-server
subjects:
- kind: ServiceAccount
name: metrics-server
Expand All @@ -87,65 +101,96 @@ subjects:
apiVersion: v1
kind: Service
metadata:
name: metrics-server
namespace: kube-system
labels:
k8s-app: metrics-server
addonmanager.kubernetes.io/mode: {{GetMode}}
kubernetes.io/name: "Metrics-server"
kubernetes.io/cluster-service: "true"
name: metrics-server
namespace: kube-system
spec:
selector:
k8s-app: metrics-server
ports:
- port: 443
- name: https
port: 443
protocol: TCP
targetPort: 443
targetPort: https
selector:
k8s-app: metrics-server
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: metrics-server
namespace: kube-system
labels:
k8s-app: metrics-server
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: {{GetMode}}
name: metrics-server
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: metrics-server
strategy:
rollingUpdate:
maxUnavailable: 0
template:
metadata:
name: metrics-server
labels:
k8s-app: metrics-server
spec:
serviceAccountName: metrics-server
priorityClassName: system-cluster-critical
containers:
- name: metrics-server
- args:
- --cert-dir=/tmp
- --secure-port=4443
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --kubelet-use-node-status-port
- --kubelet-insecure-tls
image: {{ContainerImage "metrics-server"}}
imagePullPolicy: IfNotPresent
command:
- /metrics-server
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP
livenessProbe:
failureThreshold: 3
httpGet:
path: /livez
port: https
scheme: HTTPS
periodSeconds: 10
name: metrics-server
ports:
- containerPort: 4443
name: https
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /readyz
port: https
scheme: HTTPS
periodSeconds: 10
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
volumeMounts:
- mountPath: /tmp
name: tmp-dir
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-cluster-critical
serviceAccountName: metrics-server
volumes:
- emptyDir: {}
name: tmp-dir
---
apiVersion: apiregistration.k8s.io/v1{{- if not (IsKubernetesVersionGe "1.19.0")}}beta1{{end}}
kind: APIService
metadata:
name: v1beta1.metrics.k8s.io
labels:
kubernetes.io/cluster-service: "true"
k8s-app: metrics-server
addonmanager.kubernetes.io/mode: {{GetMode}}
name: v1beta1.metrics.k8s.io
spec:
group: metrics.k8s.io
groupPriorityMinimum: 100
insecureSkipTLSVerify: true
service:
name: metrics-server
namespace: kube-system
group: metrics.k8s.io
version: v1beta1
insecureSkipTLSVerify: true
groupPriorityMinimum: 100
versionPriority: 100
28 changes: 14 additions & 14 deletions pkg/api/k8s_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,43 +116,43 @@ var kubernetesImageBaseVersionedImages = map[string]map[string]map[string]string
common.KubernetesImageBaseTypeGCR: {
"1.22": {
common.AddonResizerComponentName: "addon-resizer:1.8.7",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.1",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.4",
common.AddonManagerComponentName: "kube-addon-manager-amd64:v9.1.5",
common.ClusterAutoscalerAddonName: "cluster-autoscaler:v1.18.0",
},
"1.21": {
common.AddonResizerComponentName: "addon-resizer:1.8.7",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.1",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.4",
common.AddonManagerComponentName: "kube-addon-manager-amd64:v9.1.3",
common.ClusterAutoscalerAddonName: "cluster-autoscaler:v1.18.0",
},
"1.20": {
common.AddonResizerComponentName: "addon-resizer:1.8.7",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.1",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.4",
common.AddonManagerComponentName: "kube-addon-manager-amd64:v9.1.3",
common.ClusterAutoscalerAddonName: "cluster-autoscaler:v1.18.0",
},
"1.19": {
common.AddonResizerComponentName: "addon-resizer:1.8.7",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.1",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.4",
common.AddonManagerComponentName: "kube-addon-manager-amd64:v9.1.3",
common.ClusterAutoscalerAddonName: "cluster-autoscaler:v1.18.0",
},
"1.18": {
common.AddonResizerComponentName: "addon-resizer:1.8.7",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.1",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.4",
common.AddonManagerComponentName: "kube-addon-manager-amd64:v9.1.3",
common.ClusterAutoscalerAddonName: "cluster-autoscaler:v1.18.0",
},
"1.17": {
common.AddonResizerComponentName: "addon-resizer:1.8.7",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.1",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.4",
common.AddonManagerComponentName: "kube-addon-manager-amd64:v9.1.3",
common.ClusterAutoscalerAddonName: "cluster-autoscaler:v1.17.1",
},
"1.16": {
common.AddonResizerComponentName: "addon-resizer:1.8.7",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.1",
common.MetricsServerAddonName: "metrics-server/metrics-server:v0.4.4",
common.AddonManagerComponentName: "kube-addon-manager-amd64:v9.1.3",
common.ClusterAutoscalerAddonName: "cluster-autoscaler:v1.16.4",
},
Expand Down Expand Up @@ -240,43 +240,43 @@ var kubernetesImageBaseVersionedImages = map[string]map[string]map[string]string
common.KubernetesImageBaseTypeMCR: {
"1.22": {
common.AddonResizerComponentName: "oss/kubernetes/autoscaler/addon-resizer:1.8.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.3.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.4.4",
common.AddonManagerComponentName: "oss/kubernetes/kube-addon-manager:v9.1.5",
common.ClusterAutoscalerAddonName: "oss/kubernetes/autoscaler/cluster-autoscaler:v1.20.0",
},
"1.21": {
common.AddonResizerComponentName: "oss/kubernetes/autoscaler/addon-resizer:1.8.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.3.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.4.4",
common.AddonManagerComponentName: "oss/kubernetes/kube-addon-manager:v9.1.3",
common.ClusterAutoscalerAddonName: "oss/kubernetes/autoscaler/cluster-autoscaler:v1.20.0",
},
"1.20": {
common.AddonResizerComponentName: "oss/kubernetes/autoscaler/addon-resizer:1.8.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.3.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.4.4",
common.AddonManagerComponentName: "oss/kubernetes/kube-addon-manager:v9.1.3",
common.ClusterAutoscalerAddonName: "oss/kubernetes/autoscaler/cluster-autoscaler:v1.20.0",
},
"1.19": {
common.AddonResizerComponentName: "oss/kubernetes/autoscaler/addon-resizer:1.8.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.3.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.4.4",
common.AddonManagerComponentName: "oss/kubernetes/kube-addon-manager:v9.1.3",
common.ClusterAutoscalerAddonName: "oss/kubernetes/autoscaler/cluster-autoscaler:v1.20.0",
},
"1.18": {
common.AddonResizerComponentName: "oss/kubernetes/autoscaler/addon-resizer:1.8.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.3.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.4.4",
common.AddonManagerComponentName: "oss/kubernetes/kube-addon-manager:v9.1.3",
common.ClusterAutoscalerAddonName: "oss/kubernetes/autoscaler/cluster-autoscaler:v1.20.0",
},
"1.17": {
common.AddonResizerComponentName: "oss/kubernetes/autoscaler/addon-resizer:1.8.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.3.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.4.4",
common.AddonManagerComponentName: "oss/kubernetes/kube-addon-manager:v9.1.3",
common.ClusterAutoscalerAddonName: "oss/kubernetes/autoscaler/cluster-autoscaler:v1.20.0",
},
"1.16": {
common.AddonResizerComponentName: "oss/kubernetes/autoscaler/addon-resizer:1.8.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.3.7",
common.MetricsServerAddonName: "oss/kubernetes/metrics-server:v0.4.4",
common.AddonManagerComponentName: "oss/kubernetes/kube-addon-manager:v9.1.3",
common.ClusterAutoscalerAddonName: "oss/kubernetes/autoscaler/cluster-autoscaler:v1.16.7",
},
Expand Down
Loading