about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorChristian Albrecht <christian.albrecht@mayflower.de>2019-03-01 07:56:59 +0100
committerChristian Albrecht <christian.albrecht@mayflower.de>2019-03-03 19:34:57 +0100
commitf9e2f76a590d11cbeaa10e3953ddc96110bf1b3b (patch)
tree6cb5d4117495ab4fc37a42a6eb02044471730eb5 /nixos/tests
parent2d20e8c5f2e029606e65d2e480b5d1d961c69f50 (diff)
downloadnixlib-f9e2f76a590d11cbeaa10e3953ddc96110bf1b3b.tar
nixlib-f9e2f76a590d11cbeaa10e3953ddc96110bf1b3b.tar.gz
nixlib-f9e2f76a590d11cbeaa10e3953ddc96110bf1b3b.tar.bz2
nixlib-f9e2f76a590d11cbeaa10e3953ddc96110bf1b3b.tar.lz
nixlib-f9e2f76a590d11cbeaa10e3953ddc96110bf1b3b.tar.xz
nixlib-f9e2f76a590d11cbeaa10e3953ddc96110bf1b3b.tar.zst
nixlib-f9e2f76a590d11cbeaa10e3953ddc96110bf1b3b.zip
nixos/kubernetes: Add systemd path units
to protect services from crashing and clobbering the logs when
certificates are not in place yet and make sure services are activated
when certificates are ready.

To prevent errors similar to "kube-controller-manager.path: Failed to
enter waiting state: Too many open files"
fs.inotify.max_user_instances has to be increased.
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/kubernetes/base.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/tests/kubernetes/base.nix b/nixos/tests/kubernetes/base.nix
index ec1a75e74c41..212023859f6d 100644
--- a/nixos/tests/kubernetes/base.nix
+++ b/nixos/tests/kubernetes/base.nix
@@ -30,7 +30,10 @@ let
         { config, pkgs, lib, nodes, ... }:
           mkMerge [
             {
-              boot.postBootCommands = "rm -fr /var/lib/kubernetes/secrets /tmp/shared/*";
+              boot = {
+                postBootCommands = "rm -fr /var/lib/kubernetes/secrets /tmp/shared/*";
+                kernel.sysctl = { "fs.inotify.max_user_instances" = 256; };
+              };
               virtualisation.memorySize = mkDefault 1536;
               virtualisation.diskSize = mkDefault 4096;
               networking = {