1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

Merge pull request #132087 from scvalex/improve-kubernetes-tests

kubernetes: fix flaky test and run tests as group
This commit is contained in:
Jörg Thalheim 2021-08-22 19:25:50 +01:00 committed by GitHub
commit b7802cf399
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 34 additions and 15 deletions

View file

@ -84,6 +84,9 @@ in
Restart = "on-failure";
RestartSec = 10;
};
unitConfig = {
StartLimitIntervalSec = 0;
};
};
services.kubernetes.addonManager.bootstrapAddons = mkIf isRBACEnabled

View file

@ -398,6 +398,10 @@ in
Restart = "on-failure";
RestartSec = 5;
};
unitConfig = {
StartLimitIntervalSec = 0;
};
};
services.etcd = {

View file

@ -146,6 +146,9 @@ in
User = "kubernetes";
Group = "kubernetes";
};
unitConfig = {
StartLimitIntervalSec = 0;
};
path = top.path;
};

View file

@ -337,6 +337,9 @@ in
'';
WorkingDirectory = top.dataDir;
};
unitConfig = {
StartLimitIntervalSec = 0;
};
};
# Allways include cni plugins

View file

@ -77,6 +77,9 @@ in
Restart = "on-failure";
RestartSec = 5;
};
unitConfig = {
StartLimitIntervalSec = 0;
};
};
services.kubernetes.proxy.hostname = with config.networking; mkDefault hostName;

View file

@ -79,6 +79,9 @@ in
Restart = "on-failure";
RestartSec = 5;
};
unitConfig = {
StartLimitIntervalSec = 0;
};
};
services.kubernetes.pki.certs = {

View file

@ -221,10 +221,7 @@ in
knot = handleTest ./knot.nix {};
krb5 = discoverTests (import ./krb5 {});
ksm = handleTest ./ksm.nix {};
kubernetes.dns = handleTestOn ["x86_64-linux"] ./kubernetes/dns.nix {};
# kubernetes.e2e should eventually replace kubernetes.rbac when it works
#kubernetes.e2e = handleTestOn ["x86_64-linux"] ./kubernetes/e2e.nix {};
kubernetes.rbac = handleTestOn ["x86_64-linux"] ./kubernetes/rbac.nix {};
kubernetes = handleTestOn ["x86_64-linux"] ./kubernetes {};
latestKernel.hardened = handleTest ./hardened.nix { latestKernel = true; };
latestKernel.login = handleTest ./login.nix { latestKernel = true; };
leaps = handleTest ./leaps.nix {};

View file

@ -1,7 +1,15 @@
{ system ? builtins.currentSystem }:
{ system ? builtins.currentSystem
, pkgs ? import <nixpkgs> { inherit system; }
}:
let
dns = import ./dns.nix { inherit system pkgs; };
rbac = import ./rbac.nix { inherit system pkgs; };
# TODO kubernetes.e2e should eventually replace kubernetes.rbac when it works
# e2e = import ./e2e.nix { inherit system pkgs; };
in
{
dns = import ./dns.nix { inherit system; };
# e2e = import ./e2e.nix { inherit system; }; # TODO: make it pass
# the following test(s) can be removed when e2e is working:
rbac = import ./rbac.nix { inherit system; };
dns-single-node = dns.singlenode.test;
dns-multi-node = dns.multinode.test;
rbac-single-node = rbac.singlenode.test;
rbac-multi-node = rbac.multinode.test;
}

View file

@ -97,10 +97,5 @@ stdenv.mkDerivation rec {
platforms = platforms.unix;
};
passthru.tests = with nixosTests.kubernetes; {
dns-single-node = dns.singlenode;
dns-multi-node = dns.multinode;
rbac-single-node = rbac.singlenode;
rbac-multi-node = rbac.multinode;
};
passthru.tests = nixosTests.kubernetes;
}