inttest/cli: test with systemd based docker image#7315
Conversation
|
Phew, a big change for just testing systemctl start/stop wrappers. |
|
Bootloose's own debian image has systemd? |
509ef3a to
2fae79e
Compare
|
Its now based on bootloose image |
There was a problem hiding this comment.
Pull request overview
Adds a systemd-based bootloose test image and a new LaunchModeSystemd path so the CLI integration tests can exercise k0s install/start/stop via systemd units (as a complement to the existing OpenRC/alpine coverage).
Changes:
- Add
bootloose-systemdDocker image build + assets (systemd unit, nginx config, troubleshoot bundle config). - Add
LaunchModeSystemdand asystemdLaunchDelegateto start/stop k0s viasystemctland collect logs viajournalctl. - Split CLI inttest flow to run an install/start/stop smoke test for both the existing suite and a new systemd-based suite.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| inttest/Makefile | Adds a build stamp + target dependency to build the new bootloose-systemd image for check-cli. |
| inttest/common/launchdelegate.go | Introduces LaunchModeSystemd and a systemdLaunchDelegate that manages k0s via systemd units. |
| inttest/common/bootloosesuite.go | Wires LaunchModeSystemd into BootlooseSuite’s delegate selection. |
| inttest/cli/cli_test.go | Refactors CLI flow and adds a new systemd-based CLI suite. |
| inttest/bootloose-systemd/root/usr/local/bin/troubleshoot-k0s-inttest.sh | Adds support-bundle collection script for the systemd image. |
| inttest/bootloose-systemd/root/etc/troubleshoot/k0s-inttest.yaml | Adds troubleshoot support-bundle spec for systemd image. |
| inttest/bootloose-systemd/root/etc/systemd/system/k0s-seed.service | Adds systemd unit intended to seed /usr/local/bin/k0s from /dist/k0s. |
| inttest/bootloose-systemd/root/etc/nginx/sites-available/default | Adds nginx default site config (mirrors alpine image behavior). |
| inttest/bootloose-systemd/Dockerfile | Defines the new systemd-based bootloose image and installs required tooling (systemd, ssh, nginx, helm, troubleshoot, etc.). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This also give us the ability to test anything on systemd if ever needed. We could for example add tests to verify that the cgroups are handled as expected on systemd. |
Use upstream bootloose ubuntu image. Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Signed-off-by: Natanael Copa <ncopa@mirantis.com>
…methods Signed-off-by: Natanael Copa <ncopa@mirantis.com>
This allows us to test that k0s install/start/stop works with systemd. Signed-off-by: Natanael Copa <ncopa@mirantis.com>
Description
Add Ubuntu image for bootloose so we can test that k0s install/start/stop works with systemd units.
ref: #7053
Type of change
How Has This Been Tested?
Checklist