2016-01-09 09:45:50 +00:00
|
|
|
---
|
|
|
|
kind: "Pod"
|
|
|
|
apiVersion: "v1"
|
|
|
|
metadata:
|
|
|
|
name: "flannel"
|
|
|
|
namespace: "kube-system"
|
|
|
|
labels:
|
|
|
|
app: "flannel"
|
|
|
|
version: "v0.1"
|
|
|
|
spec:
|
|
|
|
volumes:
|
|
|
|
- name: "subnetenv"
|
|
|
|
hostPath:
|
|
|
|
path: "/run/flannel"
|
|
|
|
- name: "networkconfig"
|
|
|
|
hostPath:
|
|
|
|
path: "/etc/flannel-network.json"
|
|
|
|
containers:
|
|
|
|
- name: "flannel-server-helper"
|
2016-07-04 09:14:45 +00:00
|
|
|
image: "{{ flannel_server_helper_image_repo }}:{{ flannel_server_helper_image_tag }}"
|
2016-01-09 09:45:50 +00:00
|
|
|
args:
|
|
|
|
- "--network-config=/etc/flannel-network.json"
|
|
|
|
- "--etcd-prefix=/{{ cluster_name }}/network"
|
2016-11-09 10:31:12 +00:00
|
|
|
- "--etcd-endpoints={{ etcd_access_endpoint }}"
|
2016-01-09 09:45:50 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: "networkconfig"
|
|
|
|
mountPath: "/etc/flannel-network.json"
|
|
|
|
imagePullPolicy: "Always"
|
|
|
|
- name: "flannel-container"
|
2016-07-04 09:14:45 +00:00
|
|
|
image: "{{ flannel_image_repo }}:{{ flannel_image_tag }}"
|
2016-01-09 09:45:50 +00:00
|
|
|
command:
|
|
|
|
- "/bin/sh"
|
|
|
|
- "-c"
|
2016-07-11 14:05:05 +00:00
|
|
|
- "/opt/bin/flanneld -etcd-endpoints {{ etcd_access_endpoint }} -etcd-prefix /{{ cluster_name }}/network {% 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"
|
|
|
|
securityContext:
|
|
|
|
privileged: true
|
|
|
|
hostNetwork: true
|