c12s-kubespray/roles/network_plugin/flannel/templates/flannel-pod.yml

41 lines
1.5 KiB
YAML
Raw Normal View History

2016-01-09 09:45:50 +00:00
---
kind: "Pod"
apiVersion: "v1"
metadata:
name: "flannel"
namespace: "{{system_namespace}}"
2016-01-09 09:45:50 +00:00
labels:
app: "flannel"
version: "v0.1"
spec:
volumes:
- name: "subnetenv"
hostPath:
path: "/run/flannel"
2016-11-09 10:44:41 +00:00
- name: "etcd-certs"
2016-01-09 09:45:50 +00:00
hostPath:
path: "{{ network_plugin_etcd_cert_dir_real }}"
2016-01-09 09:45:50 +00:00
containers:
- name: "flannel-container"
image: "{{ flannel_image_repo }}:{{ flannel_image_tag }}"
imagePullPolicy: {{ k8s_image_pull_policy }}
2016-01-09 09:45:50 +00:00
command:
- "/bin/sh"
- "-c"
- "/opt/bin/flanneld -etcd-endpoints {{ network_plugin_etcd_access_endpoint }} -etcd-prefix /{{ cluster_name }}/network -etcd-cafile {{ network_plugin_etcd_cert_dir_real }}/ca.pem -etcd-certfile {{ network_plugin_etcd_cert_dir_real }}/node.pem -etcd-keyfile {{ network_plugin_etcd_cert_dir_real }}/node-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 09:45:50 +00:00
ports:
- hostPort: 10253
containerPort: 10253
resources:
limits:
cpu: "100m"
volumeMounts:
- name: "subnetenv"
mountPath: "/run/flannel"
2016-11-09 10:44:41 +00:00
- name: "etcd-certs"
mountPath: "{{ network_plugin_etcd_cert_dir_real }}"
readOnly: true
2016-01-09 09:45:50 +00:00
securityContext:
privileged: true
hostNetwork: true