summaryrefslogtreecommitdiffstats
path: root/roles/calico/templates/calico.service.j2
blob: 719d7ba0dab3e50022eb0dab5098e4e19da5df28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[Unit]
Description=calico
After={{ openshift.docker.service_name }}.service
Requires={{ openshift.docker.service_name }}.service

[Service]
Restart=always
ExecStartPre=-/usr/bin/docker rm -f calico-node
ExecStart=/usr/bin/docker run --net=host --privileged \
 --name=calico-node \
 -e WAIT_FOR_DATASTORE=true \
 -e FELIX_DEFAULTENDPOINTTOHOSTACTION=ACCEPT \
 -e CALICO_IPV4POOL_IPIP={{ calico_ipv4pool_ipip }} \
 -e CALICO_IPV4POOL_CIDR={{ calico_ipv4pool_cidr }} \
 -e FELIX_IPV6SUPPORT=false \
 -e ETCD_ENDPOINTS={{ etcd_endpoints }} \
 -v /etc/origin/calico:/etc/origin/calico \
 -e ETCD_CA_CERT_FILE={{ calico_etcd_ca_cert_file }} \
 -e ETCD_CERT_FILE={{ calico_etcd_cert_file }} \
 -e ETCD_KEY_FILE={{ calico_etcd_key_file }} \
 -e NODENAME={{ openshift.common.hostname }} \
 -v {{ calico_log_dir }}:/var/log/calico\
 -v /lib/modules:/lib/modules \
 -v /var/run/calico:/var/run/calico \
 {{ calico_node_image }}


ExecStop=-/usr/bin/docker stop calico-node

[Install]
WantedBy=multi-user.target