Merge pull request #20794 from bprashanth/etcd_config

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2016-02-09 04:07:26 -08:00
commit 0fe5499fbc
2 changed files with 25 additions and 6 deletions

View File

@ -35,7 +35,7 @@
"args": [ "args": [
"--network-config=/etc/kubernetes/network.json", "--network-config=/etc/kubernetes/network.json",
"--etcd-prefix=/kubernetes.io/network", "--etcd-prefix=/kubernetes.io/network",
"--etcd-server=http://127.0.0.1:4001" "--etcd-server=http://127.0.0.1:{{ etcd_port }}"
], ],
"volumeMounts": [ "volumeMounts": [
{ {
@ -51,7 +51,7 @@
"command": [ "command": [
"/bin/sh", "/bin/sh",
"-c", "-c",
"/opt/bin/flanneld -listen 0.0.0.0:10253 -etcd-endpoints http://127.0.0.1:4001 -etcd-prefix /kubernetes.io/network 1>>/var/log/flannel_server.log 2>&1" "/opt/bin/flanneld -listen 0.0.0.0:10253 -etcd-endpoints http://127.0.0.1:{{ etcd_port }} -etcd-prefix /kubernetes.io/network 1>>/var/log/flannel_server.log 2>&1"
], ],
"ports": [ "ports": [
{ {
@ -77,15 +77,28 @@
"command": [ "command": [
"/bin/sh", "/bin/sh",
"-c", "-c",
"/opt/bin/etcd --listen-peer-urls http://127.0.0.1:4001 --addr http://127.0.0.1:4001 --bind-addr 127.0.0.1:4001 --data-dir /var/etcd/data 1>>/var/log/etcd_flannel.log 2>&1" "/usr/local/bin/etcd --listen-peer-urls http://127.0.0.1:{{ etcd_peer_port }} --addr 127.0.0.1:{{ etcd_port }} --bind-addr 127.0.0.1:{{ etcd_port }} --data-dir /var/etcd/data 1>>/var/log/etcd_flannel.log 2>&1"
], ],
"livenessProbe": {
"httpGet": {
"host": "127.0.0.1",
"port": {{ etcd_port }},
"path": "/health"
},
"initialDelaySeconds": 15,
"timeoutSeconds": 15
},
"resources": { "resources": {
"limits": { "limits": {
"cpu": "100m", "cpu": {{ cpulimit }},
"memory": "50Mi" "memory": {{ memlimit }}
} }
}, },
"volumeMounts": [ "volumeMounts": [
{
"name": "varlog",
"mountPath": "/var/log"
},
{ {
"name": "etcdstorage", "name": "etcdstorage",
"mountPath": "/var/etcd/data" "mountPath": "/var/etcd/data"
@ -96,4 +109,3 @@
"hostNetwork": true "hostNetwork": true
} }
} }

View File

@ -22,3 +22,10 @@ touch /var/log/etcd_flannel.log:
- mode: 644 - mode: 644
- makedirs: true - makedirs: true
- dir_mode: 755 - dir_mode: 755
- template: jinja
- context:
etcd_port: 4003
etcd_peer_port: 2382
cpulimit: '"100m"'
memlimit: '"50Mi"'