mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #53527 from piosz/metrics-server-nanny
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Autoscale metrics-server with pod-nanny
This commit is contained in:
commit
2a4d30e77a
@ -35,11 +35,6 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: metrics-server
|
- name: metrics-server
|
||||||
image: gcr.io/google_containers/metrics-server-amd64:v0.2.0
|
image: gcr.io/google_containers/metrics-server-amd64:v0.2.0
|
||||||
imagePullPolicy: Always
|
|
||||||
# TODO(piosz): revisit resources
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: 100Mi
|
|
||||||
command:
|
command:
|
||||||
- /metrics-server
|
- /metrics-server
|
||||||
- --source=kubernetes.summary_api:''
|
- --source=kubernetes.summary_api:''
|
||||||
@ -47,6 +42,35 @@ spec:
|
|||||||
- containerPort: 443
|
- containerPort: 443
|
||||||
name: https
|
name: https
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
- name: metrics-server-nanny
|
||||||
|
image: gcr.io/google_containers/addon-resizer:1.7
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 300Mi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 100Mi
|
||||||
|
env:
|
||||||
|
- name: MY_POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: MY_POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
command:
|
||||||
|
- /pod_nanny
|
||||||
|
- --cpu=80m
|
||||||
|
- --extra-cpu=0.5m
|
||||||
|
- --memory=140Mi
|
||||||
|
- --extra-memory=4Mi
|
||||||
|
- --threshold=5
|
||||||
|
- --deployment=metrics-server-v0.2.0
|
||||||
|
- --container=metrics-server
|
||||||
|
- --poll-period=300000
|
||||||
|
- --estimator=exponential
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: "CriticalAddonsOnly"
|
- key: "CriticalAddonsOnly"
|
||||||
operator: "Exists"
|
operator: "Exists"
|
||||||
|
@ -23,6 +23,7 @@ rules:
|
|||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
|
- update
|
||||||
- watch
|
- watch
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
Loading…
Reference in New Issue
Block a user