Skip to content

Commit

Permalink
port missing changes from flannel to canal
Browse files Browse the repository at this point in the history
  • Loading branch information
kwmonroe committed Feb 9, 2023
1 parent 2366961 commit c7187bc
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions reactive/flannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,14 @@ def configure_network(etcd):
}
})
cmd = "etcdctl "
cmd += "--endpoint '{0}' ".format(etcd.get_connection_string())
cmd += "--cert-file {0} ".format(ETCD_CERT_PATH)
cmd += "--key-file {0} ".format(ETCD_KEY_PATH)
cmd += "--ca-file {0} ".format(ETCD_CA_PATH)
cmd += "set /coreos.com/network/config '{0}'".format(data)
cmd += "--endpoints '{0}' ".format(etcd.get_connection_string())
cmd += "--cert {0} ".format(ETCD_CERT_PATH)
cmd += "--key {0} ".format(ETCD_KEY_PATH)
cmd += "--cacert {0} ".format(ETCD_CA_PATH)
cmd += "put /coreos.com/network/config '{0}'".format(data)
env = dict(os.environ, ETCDCTL_API="3")
try:
check_call(split(cmd))
check_call(split(cmd), env=env)
return True

except CalledProcessError:
Expand Down Expand Up @@ -262,9 +263,6 @@ def cleanup_deployment():
'/run/flannel/subnet.env',
'/usr/local/bin/flanneld',
'/usr/local/bin/etcdctl',
'/opt/cni/bin/flannel',
'/opt/cni/bin/bridge',
'/opt/cni/bin/host-local',
'/etc/cni/net.d/10-flannel.conf',
ETCD_KEY_PATH,
ETCD_CERT_PATH,
Expand Down

0 comments on commit c7187bc

Please sign in to comment.