| {%- from "kubernetes/map.jinja" import master with context %} |
| { |
| "kind": "Pod", |
| "apiVersion": "v1", |
| "metadata": { |
| "name": "flannel-server", |
| "namespace": "kube-system", |
| "labels": { |
| "app": "flannel-server", |
| "version": "v0.1" |
| } |
| }, |
| "spec": { |
| "volumes": [ |
| { |
| "name": "varlog", |
| "hostPath": { |
| "path": "/var/log" |
| } |
| }, |
| { |
| "name": "etcdstorage", |
| "emptyDir": {} |
| }, |
| { |
| "name": "networkconfig", |
| "hostPath": { |
| "path": "/etc/kubernetes/network.json" |
| } |
| } |
| ], |
| "containers": [ |
| { |
| "name": "flannel-server-helper", |
| "image": "gcr.io/google_containers/flannel-server-helper:0.1", |
| "args": [ |
| "--network-config=/etc/kubernetes/network.json", |
| "--etcd-prefix=/kubernetes.io/network", |
| "--etcd-server=http://127.0.0.1:4001" |
| ], |
| "volumeMounts": [ |
| { |
| "name": "networkconfig", |
| "mountPath": "/etc/kubernetes/network.json" |
| } |
| ], |
| "imagePullPolicy": "Always" |
| }, |
| { |
| "name": "flannel-container", |
| "image": "quay.io/coreos/flannel:0.5.5", |
| "command": [ |
| "/bin/sh", |
| "-c", |
| "/opt/bin/flanneld -listen 0.0.0.0:10253 -etcd-endpoints {% for member in master.etcd.members %}http://{{ member.host }}:4001{% if not loop.last %},{% endif %}{% endfor %} -etcd-prefix /kubernetes.io/network 2>&1 | tee -a /var/log/flannel_server.log" |
| ], |
| "ports": [ |
| { |
| "hostPort": 10253, |
| "containerPort": 10253 |
| } |
| ], |
| "resources": { |
| "requests": { |
| "cpu": "100m" |
| } |
| }, |
| "volumeMounts": [ |
| { |
| "name": "varlog", |
| "mountPath": "/var/log" |
| } |
| ] |
| } |
| ], |
| "hostNetwork": true |
| } |
| } |