David Anderson
1b65630e83
cmd/containerboot: switch to IPN bus monitoring instead of polling.
...
We still have to shell out to `tailscale up` because the container image's
API includes "arbitrary flags to tailscale up", unfortunately. But this
should still speed up startup a little, and also enables k8s-bound containers
to update their device information as new netmap updates come in.
Fixes #6657
Signed-off-by: David Anderson <danderson@tailscale.com>
3 years ago
David Anderson
367228ef82
cmd/containerboot: gracefully degrade if missing patch permissions in k8s.
...
Fixes #6629 .
Signed-off-by: David Anderson <danderson@tailscale.com>
3 years ago
David Anderson
e36c27bcd1
cmd/containerboot: check that k8s secret permissions are correct.
...
Updates #6629 .
Signed-off-by: David Anderson <danderson@tailscale.com>
3 years ago
David Anderson
e79a1eb24a
cmd/containerboot: refactor tests to have more explicit phases.
...
In preparation for making startup more complex with IPN bus watches.
Signed-off-by: David Anderson <danderson@tailscale.com>
3 years ago
David Anderson
a469ec8ff6
cmd/containerboot: fix some lint.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
3 years ago
Anton Tolchanov
5ff946a9e6
cmd/containerboot: fix TS_STATE_DIR environment variable
...
It's supposed to set `--statedir` rather than `--state` file.
Fixes #6634 .
Signed-off-by: Anton Tolchanov <anton@tailscale.com>
3 years ago
David Anderson
65f3dab4c6
cmd/containerboot: make a tests table, add more tests.
...
Also fix a bugs found while adding the tests, oops.
Signed-off-by: David Anderson <danderson@tailscale.com>
4 years ago
David Anderson
2111357568
cmd/containerboot: add tests.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
4 years ago