Skip to content

cmd/containerboot: provide extra args to 'tailscale set' - #10740

Closed
irbekrm wants to merge 1 commit into
mainfrom
irbekrm/set_args
Closed

irbekrm wants to merge 1 commit into
mainfrom
irbekrm/set_args

Conversation

@irbekrm

@irbekrm irbekrm commented Jan 4, 2024 •

Copy link
Copy Markdown
Contributor

Context

Introduces a new TS_SET_EXTRA_ARGS that can be used to provide additonal args to 'tailscale set'.

In #10724 we are adding functionality to the Connector custom resource to allow users to set the Tailscale node created for the Connector as an exit node. Tailscale Kubernetes operator should configure the node to advertise exit node/not advertise exit node in response to changes users make to isExitNode field on Connector spec.
However, currently it is not possible to change the --advertise-exit-node flag value for operator proxies because the only way how to pass it is TS_EXTRA_ARGS env var that is only read when the Tailnet node is created and not on subsequent updates/container restarts.

Long term

It is of course not optimal to add another env var there- long term we should either teach tailscale login/tailscale set to read config from a file or have some shim in containerboot that reads config from a file and configures tailscale accordingly.

Alternatives

  • instead of TS_EXTRA_ARGS add TS_IS_EXIT_NODE. But we probably will also need to allow to pass --advertise-app-connector (maybe before we have time to build a better configuration mechanism?) so that'd be two env vars instead of one.

  • don't do this, tell users that connector.spec.isExitNode cannot be changed post- Connector creation and some time in future fix it by implementing a better config mechanism (see above). Bad user experience for Connector in short term.

  • don't TS_AUTH_ONCE for Connector or don't clean up the auth key so the operator can force the proxy to log in if it has detected that the exit node setting has changed (?). Probably hacky and error prone

Updates #10708

Introduces a new TS_SET_EXTRA_ARGS that can be used to
provide additonal args to 'tailscale set'.

Updates #10708

Signed-off-by: Irbe Krumina <[email protected]>
@irbekrm
irbekrm requested review from knyar and maisem January 4, 2024 16:17
@irbekrm

irbekrm commented Jan 5, 2024

Copy link
Copy Markdown
Contributor Author

Thank you for review @knyar !

Closing this as we are going for a different approach and incorporate the new declarative config file mechanism instead https://pkg.go.dev/[email protected]/ipn#ConfigVAlpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants