Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow overriding TAILSCALED_FLAGS during Installation #98

Closed
jasonwbarnett opened this issue Dec 22, 2024 · 1 comment
Closed

allow overriding TAILSCALED_FLAGS during Installation #98

jasonwbarnett opened this issue Dec 22, 2024 · 1 comment

Comments

@jasonwbarnett
Copy link
Contributor

jasonwbarnett commented Dec 22, 2024

First, thank you for all the amazing work on this project. I recently got a change merged upstream (tailscale/tailscale#10828) that enables the UDM-Pro to act as a subnet router without requiring any custom ip rules, which is a great step forward.

To make this even more seamless, I’d like to propose an enhancement that allows users to override the default TAILSCALED_FLAGS during installation, avoiding the need to modify /etc/default/tailscaled after installation.

From what I’ve seen, variables in package/tailscale-env are sourced and override any shell variables set. I’d be happy to implement this change myself but wanted to ask for guidance to ensure the approach aligns with your expectations and avoids unnecessary complexity.

Would you be open to a contribution in this area? If so, any tips or preferences for implementation would be greatly appreciated!

@notheotherben
Copy link
Member

Awesome work getting that included, I had been following along for a while hoping we'd see it land.

In terms of supporting overrides during the install process, I'm absolutely open to doing so - it's something we already support to a lesser degree with the TAILSCALE_VERSION environment variable and I see no reason why we couldn't introduce a new one.

In terms of implementation, the package/tailscale-env file is loaded to configure the install/setup scripts (and in the case of the UniFi OS 1.x implementation, to govern Tailscale's operation). In the case of the UniFi 2.x+ implementation we source it, and then project those values into the /etc/default/tailscaled file using sed.

Shout if I can give you a hand with anything there, and especially when it comes to implementing the tests to validate that this all works correctly (there's an "interesting" bash-based test suite that mocks out much of this stuff but might not be intuitive).

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

No branches or pull requests

2 participants