mirror of https://github.com/k3s-io/k3s
simplify and turn more idiomatic flanneld's setup in CoreOS' cloud-configs.
Signed-off-by: António Meireles <antonio.meireles@reformi.st>pull/6/head
parent
8d94c43e70
commit
7bc7f47c3e
|
@ -11,6 +11,8 @@ coreos:
|
||||||
fleet:
|
fleet:
|
||||||
etcd-servers: http://localhost:4001
|
etcd-servers: http://localhost:4001
|
||||||
metadata: "role=master"
|
metadata: "role=master"
|
||||||
|
flannel:
|
||||||
|
interface: eth1
|
||||||
units:
|
units:
|
||||||
- name: setup-network-environment.service
|
- name: setup-network-environment.service
|
||||||
command: start
|
command: start
|
||||||
|
@ -72,16 +74,10 @@ coreos:
|
||||||
drop-ins:
|
drop-ins:
|
||||||
- name: 50-network-config.conf
|
- name: 50-network-config.conf
|
||||||
content: |
|
content: |
|
||||||
|
[Unit]
|
||||||
|
Requires=etcd.service
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
||||||
ExecStart=
|
|
||||||
ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \
|
|
||||||
/usr/bin/docker run --net=host --privileged=true --rm \
|
|
||||||
--volume=/run/flannel:/run/flannel \
|
|
||||||
--env=NOTIFY_SOCKET=/run/flannel/sd.sock \
|
|
||||||
--env-file=/run/flannel/options.env \
|
|
||||||
--volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \
|
|
||||||
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true --iface=eth1
|
|
||||||
- name: docker-cache.service
|
- name: docker-cache.service
|
||||||
command: start
|
command: start
|
||||||
content: |
|
content: |
|
||||||
|
|
|
@ -4,6 +4,8 @@ coreos:
|
||||||
fleet:
|
fleet:
|
||||||
etcd-servers: http://<master-private-ip>:4001
|
etcd-servers: http://<master-private-ip>:4001
|
||||||
metadata: "role=node"
|
metadata: "role=node"
|
||||||
|
flannel:
|
||||||
|
interface: eth1
|
||||||
units:
|
units:
|
||||||
- name: etcd.service
|
- name: etcd.service
|
||||||
mask: true
|
mask: true
|
||||||
|
@ -14,19 +16,10 @@ coreos:
|
||||||
drop-ins:
|
drop-ins:
|
||||||
- name: 50-network-config.conf
|
- name: 50-network-config.conf
|
||||||
content: |
|
content: |
|
||||||
|
[Unit]
|
||||||
|
Requires=etcd.service
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
||||||
# as we need to turn eth1 as the default interface
|
|
||||||
# https://github.com/coreos/bugs/issues/228 is sorted
|
|
||||||
# see notes in https://github.com/coreos/flannel/pull/137
|
|
||||||
ExecStart=
|
|
||||||
ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \
|
|
||||||
/usr/bin/docker run --net=host --privileged=true --rm \
|
|
||||||
--volume=/run/flannel:/run/flannel \
|
|
||||||
--env=NOTIFY_SOCKET=/run/flannel/sd.sock \
|
|
||||||
--env-file=/run/flannel/options.env \
|
|
||||||
--volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \
|
|
||||||
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld -etcd-endpoints http://<master-private-ip>:4001 --ip-masq=true --iface=eth1
|
|
||||||
- name: docker.service
|
- name: docker.service
|
||||||
command: start
|
command: start
|
||||||
drop-ins:
|
drop-ins:
|
||||||
|
|
|
@ -11,6 +11,8 @@ coreos:
|
||||||
fleet:
|
fleet:
|
||||||
etcd-servers: http://localhost:4001
|
etcd-servers: http://localhost:4001
|
||||||
metadata: "role=master"
|
metadata: "role=master"
|
||||||
|
flannel:
|
||||||
|
interface: eth1
|
||||||
units:
|
units:
|
||||||
- name: setup-network-environment.service
|
- name: setup-network-environment.service
|
||||||
command: start
|
command: start
|
||||||
|
@ -74,16 +76,10 @@ coreos:
|
||||||
drop-ins:
|
drop-ins:
|
||||||
- name: 50-network-config.conf
|
- name: 50-network-config.conf
|
||||||
content: |
|
content: |
|
||||||
|
[Unit]
|
||||||
|
Requires=etcd.service
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
||||||
ExecStart=
|
|
||||||
ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \
|
|
||||||
/usr/bin/docker run --net=host --privileged=true --rm \
|
|
||||||
--volume=/run/flannel:/run/flannel \
|
|
||||||
--env=NOTIFY_SOCKET=/run/flannel/sd.sock \
|
|
||||||
--env-file=/run/flannel/options.env \
|
|
||||||
--volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \
|
|
||||||
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true --iface=eth1
|
|
||||||
- name: docker-cache.service
|
- name: docker-cache.service
|
||||||
command: start
|
command: start
|
||||||
content: |
|
content: |
|
||||||
|
|
|
@ -4,6 +4,8 @@ coreos:
|
||||||
fleet:
|
fleet:
|
||||||
etcd-servers: http://<master-private-ip>:4001
|
etcd-servers: http://<master-private-ip>:4001
|
||||||
metadata: "role=node"
|
metadata: "role=node"
|
||||||
|
flannel:
|
||||||
|
interface: eth1
|
||||||
units:
|
units:
|
||||||
- name: etcd.service
|
- name: etcd.service
|
||||||
mask: true
|
mask: true
|
||||||
|
@ -14,16 +16,10 @@ coreos:
|
||||||
drop-ins:
|
drop-ins:
|
||||||
- name: 50-network-config.conf
|
- name: 50-network-config.conf
|
||||||
content: |
|
content: |
|
||||||
|
[Unit]
|
||||||
|
Requires=etcd.service
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
||||||
ExecStart=
|
|
||||||
ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \
|
|
||||||
/usr/bin/docker run --net=host --privileged=true --rm \
|
|
||||||
--volume=/run/flannel:/run/flannel \
|
|
||||||
--env=NOTIFY_SOCKET=/run/flannel/sd.sock \
|
|
||||||
--env-file=/run/flannel/options.env \
|
|
||||||
--volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \
|
|
||||||
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld -etcd-endpoints http://<master-private-ip>:4001 --ip-masq=true --iface=eth1
|
|
||||||
- name: docker.service
|
- name: docker.service
|
||||||
command: start
|
command: start
|
||||||
drop-ins:
|
drop-ins:
|
||||||
|
|
|
@ -9,6 +9,8 @@ write_files:
|
||||||
until curl http://127.0.0.1:4001/v2/machines; do sleep 2; done
|
until curl http://127.0.0.1:4001/v2/machines; do sleep 2; done
|
||||||
hostname: standalone
|
hostname: standalone
|
||||||
coreos:
|
coreos:
|
||||||
|
flannel:
|
||||||
|
interface: eth1
|
||||||
units:
|
units:
|
||||||
- name: etcd.service
|
- name: etcd.service
|
||||||
command: start
|
command: start
|
||||||
|
@ -35,16 +37,10 @@ coreos:
|
||||||
drop-ins:
|
drop-ins:
|
||||||
- name: 50-network-config.conf
|
- name: 50-network-config.conf
|
||||||
content: |
|
content: |
|
||||||
|
[Unit]
|
||||||
|
Requires=etcd.service
|
||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
||||||
ExecStart=
|
|
||||||
ExecStart=/usr/libexec/sdnotify-proxy /run/flannel/sd.sock \
|
|
||||||
/usr/bin/docker run --net=host --privileged=true --rm \
|
|
||||||
--volume=/run/flannel:/run/flannel \
|
|
||||||
--env=NOTIFY_SOCKET=/run/flannel/sd.sock \
|
|
||||||
--env-file=/run/flannel/options.env \
|
|
||||||
--volume=${ETCD_SSL_DIR}:/etc/ssl/etcd:ro \
|
|
||||||
quay.io/coreos/flannel:${FLANNEL_VER} /opt/bin/flanneld --ip-masq=true --iface=eth1
|
|
||||||
- name: docker-cache.service
|
- name: docker-cache.service
|
||||||
command: start
|
command: start
|
||||||
content: |
|
content: |
|
||||||
|
|
Loading…
Reference in New Issue