Quadlet: allow configuring name template for secondary units
Feature request description
Healthchecks fail on my system. I default-deny most of what systemd-analyze security checks for and allow services minimal capabilities and system calls. This is only manageable because systemd looks up overrides by left-truncating each unit's name: foo-bar.service gets overrides from foo-.service.d. This permits me to remove restrictions from all systemd- units, for example. Because podman needs a great deal of access to configure containers, I name all quadlets with a quadlet- prefix and override most restrictions.
Podman creates new units to perform health checks using the systemd API. These are named <container id>-<some hex>.service. The prefix is essentially random so I can't grant permissions to these. The service never reaches a healthy state, systemd always shows failed units, and the journal gets cluttered.
Suggest potential solution
I would like a way to configure the name of these secondary units. Maybe like <quadlet name>-healthcheck.{service,timer}. That would get the same overrides the quadlet itself gets. For example, if I have quadlet-collabora.service the healthcheck could be quadlet-collabora-healthcheck.service.d, which would get overrides in quadlet-collabora-.service.d and quadlet-.service.d.
Have you considered any alternatives?
I could turn off default denials but given all the recent zero days I think they're pertinent.
I could use SELinux instead. That is a major undertaking for my server. But even if I do enable SELinux I think default denials are another useful layer.
I could scope the denials and prefix all the units on my system, but there are many vendor units I don't want to rename.
I could add drop-ins inside every unit on my system but it's easy to slip up and leave a service unrestricted.
Additional context
Add any other context or screenshots about the feature request here.
can u assign this to me!
/assign