mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Explicitly configure master component containers and nginx with 200m each.
This commit is contained in:
parent
4b85e02504
commit
9ce11545c0
@ -8,6 +8,11 @@
|
|||||||
{
|
{
|
||||||
"name": "etcd-container",
|
"name": "etcd-container",
|
||||||
"image": "gcr.io/google_containers/etcd:2.0.12",
|
"image": "gcr.io/google_containers/etcd:2.0.12",
|
||||||
|
"resources": {
|
||||||
|
"limits": {
|
||||||
|
"cpu": "200m"
|
||||||
|
}
|
||||||
|
},
|
||||||
"command": [
|
"command": [
|
||||||
"/bin/sh",
|
"/bin/sh",
|
||||||
"-c",
|
"-c",
|
||||||
|
@ -98,6 +98,11 @@
|
|||||||
{
|
{
|
||||||
"name": "kube-apiserver",
|
"name": "kube-apiserver",
|
||||||
"image": "gcr.io/google_containers/kube-apiserver:{{pillar['kube-apiserver_docker_tag']}}",
|
"image": "gcr.io/google_containers/kube-apiserver:{{pillar['kube-apiserver_docker_tag']}}",
|
||||||
|
"resources": {
|
||||||
|
"limits": {
|
||||||
|
"cpu": "200m"
|
||||||
|
}
|
||||||
|
},
|
||||||
"command": [
|
"command": [
|
||||||
"/bin/sh",
|
"/bin/sh",
|
||||||
"-c",
|
"-c",
|
||||||
|
@ -46,6 +46,11 @@
|
|||||||
{
|
{
|
||||||
"name": "kube-controller-manager",
|
"name": "kube-controller-manager",
|
||||||
"image": "gcr.io/google_containers/kube-controller-manager:{{pillar['kube-controller-manager_docker_tag']}}",
|
"image": "gcr.io/google_containers/kube-controller-manager:{{pillar['kube-controller-manager_docker_tag']}}",
|
||||||
|
"resources": {
|
||||||
|
"limits": {
|
||||||
|
"cpu": "200m"
|
||||||
|
}
|
||||||
|
},
|
||||||
"command": [
|
"command": [
|
||||||
"/bin/sh",
|
"/bin/sh",
|
||||||
"-c",
|
"-c",
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
{
|
{
|
||||||
"name": "kube-scheduler",
|
"name": "kube-scheduler",
|
||||||
"image": "gcr.io/google_containers/kube-scheduler:{{pillar['kube-scheduler_docker_tag']}}",
|
"image": "gcr.io/google_containers/kube-scheduler:{{pillar['kube-scheduler_docker_tag']}}",
|
||||||
|
"resources": {
|
||||||
|
"limits": {
|
||||||
|
"cpu": "200m"
|
||||||
|
}
|
||||||
|
},
|
||||||
"command": [
|
"command": [
|
||||||
"/bin/sh",
|
"/bin/sh",
|
||||||
"-c",
|
"-c",
|
||||||
|
@ -8,6 +8,11 @@
|
|||||||
{
|
{
|
||||||
"name": "nginx",
|
"name": "nginx",
|
||||||
"image": "gcr.io/google-containers/nginx:v1",
|
"image": "gcr.io/google-containers/nginx:v1",
|
||||||
|
"resources": {
|
||||||
|
"limits": {
|
||||||
|
"cpu": "200m"
|
||||||
|
}
|
||||||
|
},
|
||||||
"command": [
|
"command": [
|
||||||
"nginx",
|
"nginx",
|
||||||
"-g",
|
"-g",
|
||||||
|
@ -309,7 +309,7 @@ func milliCPUToShares(milliCPU int64) int64 {
|
|||||||
// Docker converts zero milliCPU to unset, which maps to kernel default
|
// Docker converts zero milliCPU to unset, which maps to kernel default
|
||||||
// for unset: 1024. Return 2 here to really match kernel default for
|
// for unset: 1024. Return 2 here to really match kernel default for
|
||||||
// zero milliCPU.
|
// zero milliCPU.
|
||||||
return 2
|
return minShares
|
||||||
}
|
}
|
||||||
// Conceptually (milliCPU / milliCPUToCPU) * sharesPerCPU, but factored to improve rounding.
|
// Conceptually (milliCPU / milliCPUToCPU) * sharesPerCPU, but factored to improve rounding.
|
||||||
shares := (milliCPU * sharesPerCPU) / milliCPUToCPU
|
shares := (milliCPU * sharesPerCPU) / milliCPUToCPU
|
||||||
|
Loading…
Reference in New Issue
Block a user