diff --git a/nix/vm-tests/k8s-bao-login.nix b/nix/vm-tests/k8s-bao-login.nix index 133b7fa12..464350a9e 100644 --- a/nix/vm-tests/k8s-bao-login.nix +++ b/nix/vm-tests/k8s-bao-login.nix @@ -201,6 +201,10 @@ pkgs.testers.runNixOSTest { config.system.build.k8sImages ++ [ probeImage ] ); "k8s-bao/manifests".source = config.system.build.k8sManifests; + # The jwt roles the store has: one per in-cluster principal the module names. + "k8s-bao/in-cluster.json".text = builtins.toJSON ( + lib.sort lib.lessThan config.services.hyperhive.deploy.bao.k8sPrincipals + ); "k8s-bao/pod-right.json".text = builtins.toJSON (probePod "right" service tokenVolume); "k8s-bao/pod-intruder.json".text = builtins.toJSON (probePod "intruder" "intruder" tokenVolume); "k8s-bao/pod-audience.json".text = builtins.toJSON (probePod "audience" service otherAudience); @@ -236,7 +240,7 @@ pkgs.testers.runNixOSTest { CONTROL_PORT = ${toString controlPort} API = f"https://${baoName}:{POD_PORT}" ISSUER = "https://kubernetes.default.svc.cluster.local" - IN_CLUSTER = ["swarm-ci-metrics", "swarm-controller", "swarm-notify-router"] + IN_CLUSTER = json.loads(machine.succeed("cat /etc/k8s-bao/in-cluster.json")) def as_root(command: str) -> str: