23 lines
672 B
Django/Jinja
23 lines
672 B
Django/Jinja
[Unit]
|
|
Description=calicoctl node
|
|
After=etcd2.service
|
|
|
|
[Service]
|
|
EnvironmentFile=/etc/network-environment
|
|
User=root
|
|
PermissionsStartOnly=true
|
|
ExecStartPre={{ bin_dir }}/calicoctl checksystem --fix
|
|
{% if inventory_hostname in groups['kube-node'] %}
|
|
{% if peer_with_router|default(false) %}
|
|
ExecStart={{ bin_dir }}/calicoctl node --ip=${DEFAULT_IPV4} --as={{ local_as }} --kubernetes
|
|
{% else %}
|
|
ExecStart={{ bin_dir }}/calicoctl node --ip=${DEFAULT_IPV4} --kubernetes --kube-plugin-version=v0.6.0
|
|
{% endif %}
|
|
{% else %}
|
|
ExecStart={{ bin_dir }}/calicoctl node --ip=${DEFAULT_IPV4}
|
|
{% endif %}
|
|
RemainAfterExit=yes
|
|
Type=oneshot
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|