From 7b5c38e97384257a03ec29e9eec56e2a46a07816 Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Thu, 25 Feb 2021 16:00:59 +0100 Subject: nixos/kubernetes: docker -> containerd also, nixos/containerd: module init --- nixos/modules/services/networking/flannel.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'nixos/modules/services/networking/flannel.nix') diff --git a/nixos/modules/services/networking/flannel.nix b/nixos/modules/services/networking/flannel.nix index 4c040112d28..32a7eb3ed69 100644 --- a/nixos/modules/services/networking/flannel.nix +++ b/nixos/modules/services/networking/flannel.nix @@ -162,10 +162,7 @@ in { NODE_NAME = cfg.nodeName; }; path = [ pkgs.iptables ]; - preStart = '' - mkdir -p /run/flannel - touch /run/flannel/docker - '' + optionalString (cfg.storageBackend == "etcd") '' + preStart = optionalString (cfg.storageBackend == "etcd") '' echo "setting network configuration" until ${pkgs.etcdctl}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}' do @@ -177,6 +174,7 @@ in { ExecStart = "${cfg.package}/bin/flannel"; Restart = "always"; RestartSec = "10s"; + RuntimeDirectory = "flannel"; }; }; -- cgit 1.4.1