diff options
author | Wei Tang <wei@that.world> | 2022-07-19 08:09:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 16:09:42 +1000 |
commit | b0a0087d53b276b3e3f9bed8788f9c2dd8481ebc (patch) | |
tree | 05d6d2e10634076af4d887d68bc449ae40810dc9 /nixos/modules | |
parent | 4bde3bdc6f231b1d184f0aa7545d3927dc1b0abc (diff) |
nixos/flannel: upgrade to etcdv3 (#180315)
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/networking/flannel.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nixos/modules/services/networking/flannel.nix b/nixos/modules/services/networking/flannel.nix index ac84b3d35a3d8..4698c1f682c99 100644 --- a/nixos/modules/services/networking/flannel.nix +++ b/nixos/modules/services/networking/flannel.nix @@ -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 |