-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Quadlet - Allow setting Service WorkingDirectory for Kube units #19256
Quadlet - Allow setting Service WorkingDirectory for Kube units #19256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the use case, why do we need a new field for that?
A user can already set:
[Service]
WorkingDirectory=/mypath
What am I missing?
The issue is how transferable the unit file is. For example, let's say that we have a service that different users want to run. They can each place it under |
Right but for that you can use the systemd specifiers ( code LGTM |
Maybe the specifiers can solve the use case I added. But, from the discussion in #17177 it seems that having Quadlet resolve the paths is desired |
I think the issue right now is that this is random, and not something the user can easily expect. |
What is the default for this now? I am more interested in the default WorkingDir be set to the location of the quadlet. |
Systemd defaults to the users $HOME when rootless and to |
4b2708b
to
12e310b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work!
test/system/252-quadlet.bats
Outdated
run journalctl "--since=$STARTED_TIME" --unit="$QUADLET_SERVICE_NAME" | ||
is "$output" '.*Started.*\.service.*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker (right now), but please join the discussion here: #19236 (review)
12e310b
to
9e66d42
Compare
@ygalblum some of the tests are still a bit red. |
Add key for Quadlet to set WorkingDirectory to the directory of the YAML or Unit file Add Doc Add E2E tests Add System test Signed-off-by: Ygal Blum <[email protected]>
9e66d42
to
8d19070
Compare
@edsantiago I've updated my test to not use |
Thank you! LGTM but I will let others make the final approval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago, vrothberg, ygalblum The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Add key for Quadlet to set WorkingDirectory to the directory of the YAML or Unit file Add Doc
Add E2E tests
Add System test
Does this PR introduce a user-facing change?
Yes
Resolves #17177