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

Option to customize Quadlet service names #23414

Closed
lovette opened this issue Jul 26, 2024 · 2 comments · Fixed by #23427
Closed

Option to customize Quadlet service names #23414

lovette opened this issue Jul 26, 2024 · 2 comments · Fixed by #23427
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. quadlet

Comments

@lovette
Copy link

lovette commented Jul 26, 2024

Feature request description

I'm currently migrating from the "deprecated" systemd generation to Quadlets. It's been a bumpy road, mostly due to podlet not being fully baked and some generation errors that aren't surfaced unless you do a generator -dryrun.

Currently, the generator creates most service names by replacing the Quadlet file extension with a suffix like -image or -pod. In my case, for easy grep'ing and probably other forgotten reasons (my project has been using Podman since version 3), I end all my pod names with -pod so all my Quadlet pod services end in -pod-pod 🙄

For pods, the pod name itself can be set with the PodName option, which in turn eliminates the addition of a systemd- prefix, but the service name cannot be influenced.

Suggest potential solution

I would like to request that Quadlet generated service names be customizable, either based on PodName (for pods) or a new generic option such as ServiceName.

Have you considered any alternatives?

The alternative would be to rename all my pods 😁 In the meantime, I'm getting used to:

sudo systemctl status mariadb-pod-pod

Additional context

Coincidentally, I had a similar request related to prefix/suffix used by generate systemd back in 2022.

@lovette lovette added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 26, 2024
@Luap99 Luap99 added the quadlet label Jul 26, 2024
@ygalblum
Copy link
Contributor

@lovette thanks for raising this issue.
I agree that like with .container and .kube units, users interact with the service created for the .pod file. However, I'm not sure this change is needed for other types because they are supposed to be used only as dependencies. WDYT?
I've created a PR that addresses this request for .pod files. It was simpler for .pod units because of some other code that was already available.

@lovette
Copy link
Author

lovette commented Jul 30, 2024

I’m traveling and can’t tell using my phone exactly what the proposed solution is. The two proposals that came to mind for me were either 1) not appending a suffix if the name already ends with that suffix or 2) adding a ServiceName option (to them all perhaps.) The first seems like a quick fix and the second provides the most flexibility.

@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Oct 29, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. quadlet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants