From 2d5c429f9d75e970d53e5c78626580cda60470ab Mon Sep 17 00:00:00 2001 From: gmarek Date: Fri, 4 Dec 2015 16:21:12 +0100 Subject: [PATCH] Add resource requests to addons --- .../google/heapster-controller.yaml | 4 ++++ .../heapster-controller-combined.yaml | 4 ++++ .../influxdb/heapster-controller.yaml | 4 ++++ .../influxdb/influxdb-grafana-controller.yaml | 8 ++++++++ .../standalone/heapster-controller.yaml | 4 ++++ cluster/addons/dns/skydns-rc.yaml.in | 16 ++++++++++++++++ .../fluentd-elasticsearch/es-controller.yaml | 3 +++ .../fluentd-elasticsearch/kibana-controller.yaml | 3 +++ cluster/addons/kube-ui/kube-ui-rc.yaml | 4 ++++ cluster/addons/registry/registry-rc.yaml | 4 ++++ 10 files changed, 54 insertions(+) diff --git a/cluster/addons/cluster-monitoring/google/heapster-controller.yaml b/cluster/addons/cluster-monitoring/google/heapster-controller.yaml index 7ae4d4ef693..360b8a5905a 100644 --- a/cluster/addons/cluster-monitoring/google/heapster-controller.yaml +++ b/cluster/addons/cluster-monitoring/google/heapster-controller.yaml @@ -28,9 +28,13 @@ spec: - image: gcr.io/google_containers/heapster:v0.18.2 name: heapster resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: {{ heapster_memory }} + requests: + cpu: 100m + memory: {{ heapster_memory }} command: - /heapster - --source=kubernetes:'' diff --git a/cluster/addons/cluster-monitoring/googleinfluxdb/heapster-controller-combined.yaml b/cluster/addons/cluster-monitoring/googleinfluxdb/heapster-controller-combined.yaml index b5aa21f6327..57b6b3ee1c0 100644 --- a/cluster/addons/cluster-monitoring/googleinfluxdb/heapster-controller-combined.yaml +++ b/cluster/addons/cluster-monitoring/googleinfluxdb/heapster-controller-combined.yaml @@ -28,9 +28,13 @@ spec: - image: gcr.io/google_containers/heapster:v0.18.2 name: heapster resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: {{ heapster_memory }} + requests: + cpu: 100m + memory: {{ heapster_memory }} command: - /heapster - --source=kubernetes:'' diff --git a/cluster/addons/cluster-monitoring/influxdb/heapster-controller.yaml b/cluster/addons/cluster-monitoring/influxdb/heapster-controller.yaml index 0ac486bcd9b..f2639da0d71 100644 --- a/cluster/addons/cluster-monitoring/influxdb/heapster-controller.yaml +++ b/cluster/addons/cluster-monitoring/influxdb/heapster-controller.yaml @@ -28,9 +28,13 @@ spec: - image: gcr.io/google_containers/heapster:v0.18.2 name: heapster resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: {{ heapster_memory }} + requests: + cpu: 100m + memory: {{ heapster_memory }} command: - /heapster - --source=kubernetes:'' diff --git a/cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml b/cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml index be23f4cb739..f62e83ac3c3 100644 --- a/cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml +++ b/cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml @@ -23,9 +23,13 @@ spec: - image: gcr.io/google_containers/heapster_influxdb:v0.4 name: influxdb resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: 200Mi + requests: + cpu: 100m + memory: 200Mi ports: - containerPort: 8083 hostPort: 8083 @@ -38,9 +42,13 @@ spec: name: grafana env: resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: 100Mi + requests: + cpu: 100m + memory: 100Mi env: # This variable is required to setup templates in Grafana. - name: INFLUXDB_SERVICE_URL diff --git a/cluster/addons/cluster-monitoring/standalone/heapster-controller.yaml b/cluster/addons/cluster-monitoring/standalone/heapster-controller.yaml index a1c77b6408e..6b6530ee19d 100644 --- a/cluster/addons/cluster-monitoring/standalone/heapster-controller.yaml +++ b/cluster/addons/cluster-monitoring/standalone/heapster-controller.yaml @@ -28,9 +28,13 @@ spec: - image: gcr.io/google_containers/heapster:v0.18.2 name: heapster resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: {{ heapster_memory }} + requests: + cpu: 100m + memory: {{ heapster_memory }} command: - /heapster - --source=kubernetes:'' diff --git a/cluster/addons/dns/skydns-rc.yaml.in b/cluster/addons/dns/skydns-rc.yaml.in index bd607a34be1..331bcf17de1 100644 --- a/cluster/addons/dns/skydns-rc.yaml.in +++ b/cluster/addons/dns/skydns-rc.yaml.in @@ -23,9 +23,13 @@ spec: - name: etcd image: gcr.io/google_containers/etcd:2.0.9 resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: 50Mi + requests: + cpu: 100m + memory: 50Mi command: - /usr/local/bin/etcd - -data-dir @@ -42,18 +46,26 @@ spec: - name: kube2sky image: gcr.io/google_containers/kube2sky:1.12 resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: 50Mi + requests: + cpu: 100m + memory: 50Mi args: # command = "/kube2sky" - -domain={{ pillar['dns_domain'] }} - name: skydns image: gcr.io/google_containers/skydns:2015-10-13-8c72f8c resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: 50Mi + requests: + cpu: 100m + memory: 50Mi args: # command = "/skydns" - -machines=http://127.0.0.1:4001 @@ -84,9 +96,13 @@ spec: - name: healthz image: gcr.io/google_containers/exechealthz:1.0 resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 10m memory: 20Mi + requests: + cpu: 10m + memory: 20Mi args: - -cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1 >/dev/null - -port=8080 diff --git a/cluster/addons/fluentd-elasticsearch/es-controller.yaml b/cluster/addons/fluentd-elasticsearch/es-controller.yaml index 28f22fc39c1..1c9e19c6ece 100644 --- a/cluster/addons/fluentd-elasticsearch/es-controller.yaml +++ b/cluster/addons/fluentd-elasticsearch/es-controller.yaml @@ -23,8 +23,11 @@ spec: - image: gcr.io/google_containers/elasticsearch:1.8 name: elasticsearch-logging resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m + requests: + cpu: 100m ports: - containerPort: 9200 name: db diff --git a/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml b/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml index 893608aef6b..f438bce4ecc 100644 --- a/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml +++ b/cluster/addons/fluentd-elasticsearch/kibana-controller.yaml @@ -23,8 +23,11 @@ spec: - name: kibana-logging image: gcr.io/google_containers/kibana:1.3 resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m + requests: + cpu: 100m env: - name: "ELASTICSEARCH_URL" value: "http://elasticsearch-logging:9200" diff --git a/cluster/addons/kube-ui/kube-ui-rc.yaml b/cluster/addons/kube-ui/kube-ui-rc.yaml index 9541bae0110..87277fb1dec 100644 --- a/cluster/addons/kube-ui/kube-ui-rc.yaml +++ b/cluster/addons/kube-ui/kube-ui-rc.yaml @@ -23,9 +23,13 @@ spec: - name: kube-ui image: gcr.io/google_containers/kube-ui:v4 resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: 50Mi + requests: + cpu: 100m + memory: 50Mi ports: - containerPort: 8080 livenessProbe: diff --git a/cluster/addons/registry/registry-rc.yaml b/cluster/addons/registry/registry-rc.yaml index 2a8bd477a68..31df8ad68d9 100644 --- a/cluster/addons/registry/registry-rc.yaml +++ b/cluster/addons/registry/registry-rc.yaml @@ -23,9 +23,13 @@ spec: - name: registry image: registry:2 resources: + # keep request = limit to keep this container in guaranteed class limits: cpu: 100m memory: 100Mi + requests: + cpu: 100m + memory: 100Mi env: - name: REGISTRY_HTTP_ADDR value: :5000