Skip to content

Commit e0a474b

Browse files
committed
Add metrics-server v0.5 manifests
1 parent fb0cfd1 commit e0a474b

File tree

6 files changed

+211
-3
lines changed

6 files changed

+211
-3
lines changed

addons/metrics-server/download.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
set -euf -o pipefail
44

5-
6-
DOWNLOAD_URL="https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.4.2/components.yaml"
7-
DOWNLOAD_VERSION="v0.4.2"
5+
DOWNLOAD_URL="https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.1/components.yaml"
6+
DOWNLOAD_VERSION="v0.5.1"
87
DOWNLOAD_DIRECTORY="$DOWNLOAD_VERSION"
98

109
mkdir -p $DOWNLOAD_DIRECTORY
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: apiregistration.k8s.io/v1
2+
kind: APIService
3+
metadata:
4+
name: v1beta1.metrics.k8s.io
5+
labels:
6+
k8s-app: metrics-server
7+
spec:
8+
group: metrics.k8s.io
9+
groupPriorityMinimum: 100
10+
insecureSkipTLSVerify: true
11+
service:
12+
name: metrics-server
13+
namespace: kube-system
14+
version: v1beta1
15+
versionPriority: 100
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: metrics-server
5+
namespace: kube-system
6+
labels:
7+
k8s-app: metrics-server
8+
spec:
9+
selector:
10+
matchLabels:
11+
k8s-app: metrics-server
12+
strategy:
13+
rollingUpdate:
14+
maxUnavailable: 0
15+
template:
16+
metadata:
17+
labels:
18+
k8s-app: metrics-server
19+
spec:
20+
containers:
21+
- name: metrics-server
22+
image: k8s.gcr.io/metrics-server/metrics-server:v0.5.1
23+
imagePullPolicy: IfNotPresent
24+
args:
25+
- --cert-dir=/tmp
26+
- --secure-port=443
27+
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
28+
- --kubelet-use-node-status-port
29+
- --metric-resolution=15s
30+
ports:
31+
- containerPort: 443
32+
name: https
33+
protocol: TCP
34+
livenessProbe:
35+
failureThreshold: 3
36+
httpGet:
37+
path: /livez
38+
port: https
39+
scheme: HTTPS
40+
periodSeconds: 10
41+
readinessProbe:
42+
failureThreshold: 3
43+
httpGet:
44+
path: /readyz
45+
port: https
46+
scheme: HTTPS
47+
initialDelaySeconds: 20
48+
periodSeconds: 10
49+
resources:
50+
requests:
51+
cpu: 100m
52+
memory: 200Mi
53+
securityContext:
54+
readOnlyRootFilesystem: true
55+
runAsNonRoot: true
56+
runAsUser: 1000
57+
volumeMounts:
58+
- mountPath: /tmp
59+
name: tmp-dir
60+
nodeSelector:
61+
kubernetes.io/os: linux
62+
priorityClassName: system-cluster-critical
63+
serviceAccountName: metrics-server
64+
volumes:
65+
- name: tmp-dir
66+
emptyDir: {}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- apiservice.yaml
6+
- deployment.yaml
7+
- rbac.yaml
8+
- service.yaml
9+
10+
namespace: kube-system
11+
12+
images:
13+
- name: "k8s.gcr.io/metrics-server/metrics-server"
14+
newTag: "v0.5.1"

addons/metrics-server/v0.5/rbac.yaml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
labels:
5+
k8s-app: metrics-server
6+
name: metrics-server
7+
namespace: kube-system
8+
9+
---
10+
apiVersion: rbac.authorization.k8s.io/v1
11+
kind: ClusterRole
12+
metadata:
13+
labels:
14+
k8s-app: metrics-server
15+
rbac.authorization.k8s.io/aggregate-to-admin: "true"
16+
rbac.authorization.k8s.io/aggregate-to-edit: "true"
17+
rbac.authorization.k8s.io/aggregate-to-view: "true"
18+
name: system:aggregated-metrics-reader
19+
rules:
20+
- apiGroups:
21+
- metrics.k8s.io
22+
resources:
23+
- pods
24+
- nodes
25+
verbs:
26+
- get
27+
- list
28+
- watch
29+
30+
---
31+
apiVersion: rbac.authorization.k8s.io/v1
32+
kind: ClusterRole
33+
metadata:
34+
labels:
35+
k8s-app: metrics-server
36+
name: system:metrics-server
37+
rules:
38+
- apiGroups:
39+
- ""
40+
resources:
41+
- pods
42+
- nodes
43+
- nodes/stats
44+
- namespaces
45+
- configmaps
46+
verbs:
47+
- get
48+
- list
49+
- watch
50+
51+
---
52+
apiVersion: rbac.authorization.k8s.io/v1
53+
kind: RoleBinding
54+
metadata:
55+
labels:
56+
k8s-app: metrics-server
57+
name: metrics-server-auth-reader
58+
namespace: kube-system
59+
roleRef:
60+
apiGroup: rbac.authorization.k8s.io
61+
kind: Role
62+
name: extension-apiserver-authentication-reader
63+
subjects:
64+
- kind: ServiceAccount
65+
name: metrics-server
66+
namespace: kube-system
67+
68+
---
69+
apiVersion: rbac.authorization.k8s.io/v1
70+
kind: ClusterRoleBinding
71+
metadata:
72+
labels:
73+
k8s-app: metrics-server
74+
name: metrics-server:system:auth-delegator
75+
roleRef:
76+
apiGroup: rbac.authorization.k8s.io
77+
kind: ClusterRole
78+
name: system:auth-delegator
79+
subjects:
80+
- kind: ServiceAccount
81+
name: metrics-server
82+
namespace: kube-system
83+
84+
---
85+
apiVersion: rbac.authorization.k8s.io/v1
86+
kind: ClusterRoleBinding
87+
metadata:
88+
labels:
89+
k8s-app: metrics-server
90+
name: system:metrics-server
91+
roleRef:
92+
apiGroup: rbac.authorization.k8s.io
93+
kind: ClusterRole
94+
name: system:metrics-server
95+
subjects:
96+
- kind: ServiceAccount
97+
name: metrics-server
98+
namespace: kube-system
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: metrics-server
5+
namespace: kube-system
6+
labels:
7+
k8s-app: metrics-server
8+
spec:
9+
type: ClusterIP
10+
ports:
11+
- name: https
12+
protocol: TCP
13+
port: 443
14+
targetPort: https
15+
selector:
16+
k8s-app: metrics-server

0 commit comments

Comments
 (0)