git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #131694 from scvalex/enable-kubernetes-passthru-tests

kubernetes: enable passthru tests

commitebb592a04c5282f316d60cd4aba066f6e5d74b65 authorSandro <sandro.jaeckel@gmail.com> dateWed 28 Jul 2021, 11:14 (5 years ago) parent17cc103b9acd42
2 files changed+11−3
nixos/modules/services/cluster/kubernetes/pki.nix+1−1 pkgs/applications/networking/cluster/kubernetes/default.nix+10−2
nixos/modules/services/cluster/kubernetes/pki.nix+1−1
@@ -189,7 +189,7 @@ in
189189 # manually paste it in place. Just symlink.
190190 # otherwise, create the target file, ready for users to insert the token
191191
192− mkdir -p $(dirname ${certmgrAPITokenPath})
192+ mkdir -p "$(dirname "${certmgrAPITokenPath}")"
193193 if [ -f "${cfsslAPITokenPath}" ]; then
194194 ln -fs "${cfsslAPITokenPath}" "${certmgrAPITokenPath}"
195195 else
pkgs/applications/networking/cluster/kubernetes/default.nix+10−2
@@ -7,6 +7,7 @@
77, makeWrapper
88, rsync
99, installShellFiles
10+, nixosTests
1011
1112, components ? [
1213 "cmd/kubelet"
@@ -66,8 +67,8 @@ stdenv.mkDerivation rec {
6667 install -D build/pause/linux/pause -t $pause/bin
6768 installManPage docs/man/man1/*.[1-9]
6869
69− # Unfortunately, kube-addons-main.sh only looks for the lib file in either the current working dir
70− # or in /opt. We have to patch this for now.
70+ # Unfortunately, kube-addons-main.sh only looks for the lib file in either the
71+ # current working dir or in /opt. We have to patch this for now.
7172 substitute cluster/addons/addon-manager/kube-addons-main.sh $out/bin/kube-addons \
7273 --subst-var out
7374
@@ -95,4 +96,11 @@ stdenv.mkDerivation rec {
9596 maintainers = with maintainers; [ johanot offline saschagrunert ];
9697 platforms = platforms.unix;
9798 };
99+
100+ passthru.tests = with nixosTests.kubernetes; {
101+ dns-single-node = dns.singlenode;
102+ dns-multi-node = dns.multinode;
103+ rbac-single-node = rbac.singlenode;
104+ rbac-multi-node = rbac.multinode;
105+ };
98106}