-
-
Notifications
You must be signed in to change notification settings - Fork 524
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
Telepresence systemd service(s) #2958
Comments
This looks interesting, and aligns well with my own thoughts, at least when it comes to the root daemon. Starting it as a service also brings the advantage that no root permissions are needed when connecting. For the connector, I've envisoned a service that runs as a non-root user and executes |
It is one of the main advantage for users. Things I'd like and which are not yet set:
I wanted this VPN-like feeling ^^ The main disadvantages of this user service are:
What do you like to see in those services ? PS: I also made a systemd auto-updater for telepresence
|
It should (that's why we pass the logdir and config dir as arguments). What problem do you see when it isn't set?
There can never be multiple connections. A connection is ultimately what controls the TUN device and the daemon will never have more than one session running.
I did look into this a while back, also had a discussion with @LukeShu (the author of the dlog package) about adding a systemd backend for dlog. He advised against that with the following motivation:
I agree with that, and I think adding the ability to log to stderr when running as a proper daemon is the way to go. Perhaps add special recognition of when
That's why we split the daemon in two. We don't want the to share more than what's absolutely necessary. The main advantage with a user service is that Kubernetes, with its configuration, caches, and third-party authentication mechanisms (for GKE, AWS, Azure to name a few. They are often in a plugin-like form that spawns separate executables), runs with the users account. It would be very bad if a user was forced to configure such things using the root account. This is the one and only motivation for the split-daemon approach. We really don't want the connector daemon to run as root. I'm intrigued by the systemd auto-updater. Perhaps we should expose the update checker that Telepresence has built-in so that it could be used as a trigger? |
Launching without XDG_CACHE_HOME gives this error:
I did not look in depth but the user counterpart needs access to this cache I think ? User daemon would not connect when root PrivateTmp was set (I use it as XDG_CACHE_HOME). It seems removing XDG_CONFIG_HOME does not give error anymore.
Yes, I thought of multiples TUN device. One per cluster.
I agree too. I thought of an option to force log to stdout/stderr, telepresence already do it when we launch it in a TTY.
I understand, I think you're right (did not find any good alternatives). We have to be careful nonetheless, the lack of synchronization can generate weird state/behaviour.
It would be great ! |
A note I'd like to share, someone in my team will likely do something similar for launchd (macos) |
Having an automated way to manage telepresence would be great instead of starting / stopping it each time we change network and/or put machine to sleep. |
For people interested in this feature. I'd recommend that you make a contribution in the form of a PR where the needed files are added in a new folder. Include a README.md in that folder explaining how to set things up. Ping @desaintmartin @spnngl |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in 7 days. |
Please describe your use case / problem.
We'd like to use
telepresence connect
as any others VPN/networking tools with systemd to monitor/reboot it and avoid launching root-level daemon by hand.Possibility to send logs/errors to stdout/stderr to have them in systemd-journald.
Describe the solution you'd like
One systemd service/template to connect to one or multiple cluster.
Describe alternatives you've considered
I've made some services, one root & one user, to do it. They are basic and needs improvements/suggestions.
Root daemon:
User daemon:
Versions (please complete the following information)
Additional context
The text was updated successfully, but these errors were encountered: