nixos/flannel: upgrade to etcdv3 (#180315)
This commit is contained in:
parent
4bde3bdc6f
commit
b0a0087d53
|
@ -155,10 +155,11 @@ in {
|
|||
FLANNELD_ETCD_KEYFILE = cfg.etcd.keyFile;
|
||||
FLANNELD_ETCD_CERTFILE = cfg.etcd.certFile;
|
||||
FLANNELD_ETCD_CAFILE = cfg.etcd.caFile;
|
||||
ETCDCTL_CERT_FILE = cfg.etcd.certFile;
|
||||
ETCDCTL_KEY_FILE = cfg.etcd.keyFile;
|
||||
ETCDCTL_CA_FILE = cfg.etcd.caFile;
|
||||
ETCDCTL_PEERS = concatStringsSep "," cfg.etcd.endpoints;
|
||||
ETCDCTL_CERT = cfg.etcd.certFile;
|
||||
ETCDCTL_KEY = cfg.etcd.keyFile;
|
||||
ETCDCTL_CACERT = cfg.etcd.caFile;
|
||||
ETCDCTL_ENDPOINTS = concatStringsSep "," cfg.etcd.endpoints;
|
||||
ETCDCTL_API = "3";
|
||||
} // optionalAttrs (cfg.storageBackend == "kubernetes") {
|
||||
FLANNELD_KUBE_SUBNET_MGR = "true";
|
||||
FLANNELD_KUBECONFIG_FILE = cfg.kubeconfig;
|
||||
|
@ -167,7 +168,7 @@ in {
|
|||
path = [ pkgs.iptables ];
|
||||
preStart = optionalString (cfg.storageBackend == "etcd") ''
|
||||
echo "setting network configuration"
|
||||
until ${pkgs.etcd}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}'
|
||||
until ${pkgs.etcd}/bin/etcdctl put /coreos.com/network/config '${builtins.toJSON networkConfig}'
|
||||
do
|
||||
echo "setting network configuration, retry"
|
||||
sleep 1
|
||||
|
|
Loading…
Reference in a new issue