2016-01-09 17:45:50 +08:00
|
|
|
---
|
|
|
|
kind: "Pod"
|
|
|
|
apiVersion: "v1"
|
|
|
|
metadata:
|
|
|
|
name: "flannel"
|
2016-12-13 18:43:06 +08:00
|
|
|
namespace: "{{system_namespace}}"
|
2016-01-09 17:45:50 +08:00
|
|
|
labels:
|
|
|
|
app: "flannel"
|
|
|
|
version: "v0.1"
|
|
|
|
spec:
|
|
|
|
volumes:
|
|
|
|
- name: "subnetenv"
|
|
|
|
hostPath:
|
|
|
|
path: "/run/flannel"
|
2016-11-09 18:44:41 +08:00
|
|
|
- name: "etcd-certs"
|
2016-01-09 17:45:50 +08:00
|
|
|
hostPath:
|
2016-12-30 20:47:12 +08:00
|
|
|
path: "{{ flannel_cert_dir }}"
|
2016-01-09 17:45:50 +08:00
|
|
|
containers:
|
|
|
|
- name: "flannel-container"
|
2016-07-04 17:14:45 +08:00
|
|
|
image: "{{ flannel_image_repo }}:{{ flannel_image_tag }}"
|
2016-11-22 23:16:04 +08:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2016-12-23 22:44:44 +08:00
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: {{ flannel_cpu_limit }}
|
|
|
|
memory: {{ flannel_memory_limit }}
|
|
|
|
requests:
|
|
|
|
cpu: {{ flannel_cpu_requests }}
|
|
|
|
memory: {{ flannel_memory_requests }}
|
2016-01-09 17:45:50 +08:00
|
|
|
command:
|
|
|
|
- "/bin/sh"
|
|
|
|
- "-c"
|
2016-12-30 20:47:12 +08:00
|
|
|
- "/opt/bin/flanneld -etcd-endpoints {{ etcd_access_endpoint }} -etcd-prefix /{{ cluster_name }}/network -etcd-cafile {{ flannel_cert_dir }}/ca_cert.crt -etcd-certfile {{ flannel_cert_dir }}/cert.crt -etcd-keyfile {{ flannel_cert_dir }}/key.pem {% if flannel_interface is defined %}-iface {{ flannel_interface }}{% endif %} {% if flannel_public_ip is defined %}-public-ip {{ flannel_public_ip }}{% endif %}"
|
2016-01-09 17:45:50 +08:00
|
|
|
ports:
|
|
|
|
- hostPort: 10253
|
|
|
|
containerPort: 10253
|
|
|
|
volumeMounts:
|
|
|
|
- name: "subnetenv"
|
|
|
|
mountPath: "/run/flannel"
|
2016-11-09 18:44:41 +08:00
|
|
|
- name: "etcd-certs"
|
2016-12-30 20:47:12 +08:00
|
|
|
mountPath: "{{ flannel_cert_dir }}"
|
2016-11-15 18:18:53 +08:00
|
|
|
readOnly: true
|
2016-01-09 17:45:50 +08:00
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
hostNetwork: true
|