mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
b8e5799a63
For multi-node test, create a 3-node cluster (2 server nodes and 1 agent node) to test the connection between nodes. Setup `passthru.tests`.
14 lines
526 B
Nix
14 lines
526 B
Nix
{ system ? builtins.currentSystem
|
|
, pkgs ? import ../../.. { inherit system; }
|
|
, lib ? pkgs.lib
|
|
}:
|
|
let
|
|
allRKE2 = lib.filterAttrs (n: _: lib.strings.hasPrefix "rke2" n) pkgs;
|
|
in
|
|
{
|
|
# Run a single node rke2 cluster and verify a pod can run
|
|
singleNode = lib.mapAttrs (_: rke2: import ./single-node.nix { inherit system pkgs rke2; }) allRKE2;
|
|
# Run a multi-node rke2 cluster and verify pod networking works across nodes
|
|
multiNode = lib.mapAttrs (_: rke2: import ./multi-node.nix { inherit system pkgs rke2; }) allRKE2;
|
|
}
|