vm-tests: k8s-bao-login expects the roles the module names
The test listed three jwt roles by hand, and the store has eight since the queue, stt, the review classifier and the claude minter joined, so it failed at the role assertion before it reached any pod. The list is now the module's own k8sPrincipals, sorted.
This commit is contained in:
parent
c909777b63
commit
58e59be65e
1 changed files with 5 additions and 1 deletions
|
|
@ -201,6 +201,10 @@ pkgs.testers.runNixOSTest {
|
||||||
config.system.build.k8sImages ++ [ probeImage ]
|
config.system.build.k8sImages ++ [ probeImage ]
|
||||||
);
|
);
|
||||||
"k8s-bao/manifests".source = config.system.build.k8sManifests;
|
"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-right.json".text = builtins.toJSON (probePod "right" service tokenVolume);
|
||||||
"k8s-bao/pod-intruder.json".text = builtins.toJSON (probePod "intruder" "intruder" 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);
|
"k8s-bao/pod-audience.json".text = builtins.toJSON (probePod "audience" service otherAudience);
|
||||||
|
|
@ -236,7 +240,7 @@ pkgs.testers.runNixOSTest {
|
||||||
CONTROL_PORT = ${toString controlPort}
|
CONTROL_PORT = ${toString controlPort}
|
||||||
API = f"https://${baoName}:{POD_PORT}"
|
API = f"https://${baoName}:{POD_PORT}"
|
||||||
ISSUER = "https://kubernetes.default.svc.cluster.local"
|
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:
|
def as_root(command: str) -> str:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue