Decrease CPU requests of master components in two times.

This commit is contained in:
Marian Lobur 2018-08-16 15:06:13 +02:00
parent 4239729fc1
commit aaedbb52d3
9 changed files with 14 additions and 14 deletions

View File

@ -1269,7 +1269,7 @@ function prepare-kube-proxy-manifest-variables {
sed -i -e "s@{{container_env}}@${container_env}@g" ${src_file} sed -i -e "s@{{container_env}}@${container_env}@g" ${src_file}
sed -i -e "s@{{kube_cache_mutation_detector_env_name}}@${kube_cache_mutation_detector_env_name}@g" ${src_file} sed -i -e "s@{{kube_cache_mutation_detector_env_name}}@${kube_cache_mutation_detector_env_name}@g" ${src_file}
sed -i -e "s@{{kube_cache_mutation_detector_env_value}}@${kube_cache_mutation_detector_env_value}@g" ${src_file} sed -i -e "s@{{kube_cache_mutation_detector_env_value}}@${kube_cache_mutation_detector_env_value}@g" ${src_file}
sed -i -e "s@{{ cpurequest }}@100m@g" ${src_file} sed -i -e "s@{{ cpurequest }}@50m@g" ${src_file}
sed -i -e "s@{{api_servers_with_port}}@${api_servers}@g" ${src_file} sed -i -e "s@{{api_servers_with_port}}@${api_servers}@g" ${src_file}
sed -i -e "s@{{kubernetes_service_host_env_value}}@${KUBERNETES_MASTER_NAME}@g" ${src_file} sed -i -e "s@{{kubernetes_service_host_env_value}}@${KUBERNETES_MASTER_NAME}@g" ${src_file}
if [[ -n "${CLUSTER_IP_RANGE:-}" ]]; then if [[ -n "${CLUSTER_IP_RANGE:-}" ]]; then
@ -1390,10 +1390,10 @@ function start-etcd-servers {
rm -f /etc/init.d/etcd rm -f /etc/init.d/etcd
fi fi
prepare-log-file /var/log/etcd.log prepare-log-file /var/log/etcd.log
prepare-etcd-manifest "" "2379" "2380" "200m" "etcd.manifest" prepare-etcd-manifest "" "2379" "2380" "100m" "etcd.manifest"
prepare-log-file /var/log/etcd-events.log prepare-log-file /var/log/etcd-events.log
prepare-etcd-manifest "-events" "4002" "2381" "100m" "etcd-events.manifest" prepare-etcd-manifest "-events" "4002" "2381" "50m" "etcd-events.manifest"
} }
# Calculates the following variables based on env variables, which will be used # Calculates the following variables based on env variables, which will be used

View File

@ -44,7 +44,7 @@
], ],
"resources": { "resources": {
"requests": { "requests": {
"cpu": "10m", "cpu": "5m",
"memory": "300Mi" "memory": "300Mi"
} }
}, },

View File

@ -11,9 +11,9 @@ spec:
- name: image-puller - name: image-puller
resources: resources:
requests: requests:
cpu: 100m cpu: 50m
limits: limits:
cpu: 100m cpu: 50m
image: k8s.gcr.io/busybox:1.24 image: k8s.gcr.io/busybox:1.24
# TODO: Replace this with a go script that pulls in parallel? # TODO: Replace this with a go script that pulls in parallel?
# Currently it takes ~5m to pull all e2e images, so this is OK, and # Currently it takes ~5m to pull all e2e images, so this is OK, and
@ -90,9 +90,9 @@ spec:
- name: nethealth-check - name: nethealth-check
resources: resources:
requests: requests:
cpu: 100m cpu: 50m
limits: limits:
cpu: 100m cpu: 50m
image: k8s.gcr.io/kube-nethealth-amd64:1.0 image: k8s.gcr.io/kube-nethealth-amd64:1.0
command: command:
- /bin/sh - /bin/sh

View File

@ -39,7 +39,7 @@ spec:
# master components on a single core master. # master components on a single core master.
# TODO: Make resource requirements depend on the size of the cluster # TODO: Make resource requirements depend on the size of the cluster
requests: requests:
cpu: 10m cpu: 5m
memory: 50Mi memory: 50Mi
command: command:
# TODO: split this out into args when we no longer need to pipe stdout to a file #6428 # TODO: split this out into args when we no longer need to pipe stdout to a file #6428

View File

@ -21,7 +21,7 @@ spec:
- exec /opt/kube-addons.sh 1>>/var/log/kube-addon-manager.log 2>&1 - exec /opt/kube-addons.sh 1>>/var/log/kube-addon-manager.log 2>&1
resources: resources:
requests: requests:
cpu: 5m cpu: 3m
memory: 50Mi memory: 50Mi
volumeMounts: volumeMounts:
- mountPath: /etc/kubernetes/ - mountPath: /etc/kubernetes/

View File

@ -22,7 +22,7 @@
"image": "{{pillar['kube_docker_registry']}}/kube-apiserver:{{pillar['kube-apiserver_docker_tag']}}", "image": "{{pillar['kube_docker_registry']}}/kube-apiserver:{{pillar['kube-apiserver_docker_tag']}}",
"resources": { "resources": {
"requests": { "requests": {
"cpu": "250m" "cpu": "125m"
} }
}, },
"command": [ "command": [

View File

@ -21,7 +21,7 @@
"image": "{{pillar['kube_docker_registry']}}/kube-controller-manager:{{pillar['kube-controller-manager_docker_tag']}}", "image": "{{pillar['kube_docker_registry']}}/kube-controller-manager:{{pillar['kube-controller-manager_docker_tag']}}",
"resources": { "resources": {
"requests": { "requests": {
"cpu": "200m" "cpu": "100m"
} }
}, },
"command": [ "command": [

View File

@ -21,7 +21,7 @@
"image": "{{pillar['kube_docker_registry']}}/kube-scheduler:{{pillar['kube-scheduler_docker_tag']}}", "image": "{{pillar['kube_docker_registry']}}/kube-scheduler:{{pillar['kube-scheduler_docker_tag']}}",
"resources": { "resources": {
"requests": { "requests": {
"cpu": "75m" "cpu": "40m"
} }
}, },
"command": [ "command": [

View File

@ -22,7 +22,7 @@ spec:
# TODO: Make resource requirements depend on the size of the cluster # TODO: Make resource requirements depend on the size of the cluster
resources: resources:
requests: requests:
cpu: 10m cpu: 5m
memory: 100Mi memory: 100Mi
command: command:
# TODO: split this out into args when we no longer need to pipe stdout to a file #6428 # TODO: split this out into args when we no longer need to pipe stdout to a file #6428