Watch
0
0
Fork
You've already forked hyperhive
0

vm-tests: the state gate refuses an empty volume until the marker is written

This commit is contained in:
atlas 2026-11-22 18:59:22 +01:00 • committed by maia
commit b95d5feb26

View file

@ -181,9 +181,13 @@ pkgs.testers.runNixOSTest {
};
system.stateVersion = "25.11";
specialisation.k8s.configuration.services.hyperhive.deploy.swarm-controller.runtime = "k8s";
specialisation.k8s.configuration.services.hyperhive.deploy.swarm-controller = {
runtime = "k8s";
k8s.freshState = true;
};
specialisation.k8s-rev.configuration.services.hyperhive.deploy = {
swarm-controller.runtime = "k8s";
swarm-controller.k8s.freshState = true;
hive-controller.hyperhiveRev = lib.mkForce revB;
};
@ -390,7 +394,7 @@ pkgs.testers.runNixOSTest {
except Exception:
diagnose(["hyperhive-k8s-ca-trust.service"])
print(machine.execute(f"kubectl -n {NS} describe pod {name}")[1])
for container in ("tls-issue", "tls-renew", SERVICE):
for container in ("state-gate", "tls-issue", "tls-renew", SERVICE):
print(machine.execute(f"kubectl -n {NS} logs {name} -c {container} --tail=60")[1])
raise
return name
@ -524,7 +528,7 @@ pkgs.testers.runNixOSTest {
assert probe["path"] == "/readyz", probe
api = next(p for p in main["ports"] if p["name"] == "api")
assert api["hostPort"] == PORT and api["hostIP"] == NODE_ADDRESS, api
assert [c["name"] for c in spec["initContainers"]] == ["tls-issue"], spec["initContainers"]
assert [c["name"] for c in spec["initContainers"]] == ["state-gate", "tls-issue"], spec["initContainers"]
assert "tls-renew" in [c["name"] for c in spec["containers"]]
assert not any("secret" in v for v in spec["volumes"]), spec["volumes"]
env = {e["name"]: e.get("value") for e in main["env"]}