k8s-nats-switch: set the default namespace again after a switch restarts k3s
This commit is contained in:
parent
79c06cdcb0
commit
9d9757c153
1 changed files with 4 additions and 0 deletions
|
|
@ -466,6 +466,10 @@ pkgs.testers.runNixOSTest {
|
|||
failed = next((line for line in out.splitlines() if "the following units failed" in line), "")
|
||||
ours = [HOST_UNIT, f"{PRUNE}.service", "hyperhive-k8s-ca-trust.service", "k3s.service", "firewall.service"]
|
||||
assert not any(unit in failed for unit in ours), failed
|
||||
# k3s writes its kubeconfig again when it restarts, which a switch that
|
||||
# changes the node's flags does, and with it drops the default namespace.
|
||||
machine.wait_until_succeeds("kubectl get --raw /readyz", timeout=300)
|
||||
kube(machine, f"config set-context --current --namespace={NS}")
|
||||
return out
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue