-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
k8systemd: run k8s workloads in systemd #14256
Conversation
@edsantiago, I would love your eyes to have a look at the tests. |
82e8e37
to
dbb6ea3
Compare
Fixed the |
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.
Tests fail; I'll review again once tests pass
Integration networking tests are very flaky atm. |
Please use this: 250-systemd.bats.txt (too big a diff, easier to just post new file). I can't actually get it to pass, the
...but I'll leave that for you to look into |
Absolute great work, @edsantiago. Thank you! |
@mheon @edsantiago PTanotherL. Thanks for the reviews! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago, vrothberg 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 |
Tests LGTM. Thanks for solving the "does not exist" issue and for finding/fixing the other instances of hardcoded hash. |
LGTM |
System test failing and looks real:
|
Looks like a race in the tests I didn't anticipate before. Glad it flaked in this PR and not after. |
Support running `podman play kube` in systemd by exploiting the previously added "service containers". During `play kube`, a service container is started before all the pods and containers, and is stopped last. The service container communicates its conmon PID via sdnotify. Add a new systemd template to dispatch such k8s workloads. The argument of the template is the path to the k8s file. Note that the path must be escaped for systemd not to bark: Let's assume we have a `top.yaml` file in the home directory: ``` $ escaped=$(systemd-escape ~/top.yaml) $ systemctl --user start podman-play-kube@$escaped.service ``` Closes: https://issues.redhat.com/browse/RUN-1287 Signed-off-by: Valentin Rothberg <[email protected]>
Fixed now o/ |
Ready. |
for i in {0..5}; do | ||
run_podman container inspect $1 --format "{{.State.Running}}" | ||
if [[ $output == "$2" ]]; then | ||
break |
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.
The best part of functions is that you can simply return
. Then the fallthrough can simply be die "Timed out waiting for .State.Running on $1 to be $2
.
But it's not worth a repush, this is just something for next time. LGTM.
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.
Thanks for explaining! Looks like I need to ramp up my bash skills a bit further.
Tests LGTM; the rest is more than I can approve |
/lgtm |
Support running
podman play kube
in systemd by exploiting thepreviously added "service containers". During
play kube
, a servicecontainer is started before all the pods and containers, and is stopped
last. The service container communicates its conmon PID via sdnotify.
Add a new systemd template to dispatch such k8s workloads. The argument
of the template is the path to the k8s file. Note that the path must be
escaped for systemd not to bark:
Let's assume we have a
top.yaml
file in the home directory:Closes: https://issues.redhat.com/browse/RUN-1287
Signed-off-by: Valentin Rothberg [email protected]
Does this PR introduce a user-facing change?
@mheon @baude @rhatdan PTAL