Skip to content

Commit

Permalink
misc: Detect k0s and error out if used
Browse files Browse the repository at this point in the history
Differently than `k3s` or `rke2`, getting `k0s` to work as expected is
quite tricky, as it relies on a drop-in configuration file, and I'm not
so confident we can easily drop-in a file with all the needed bits.

With this in mind, at least for now, let's just error out in case k0s is
used, as at least this will make sure that the users will at least have
a clue on what's been gone wrong.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
  • Loading branch information
fidencio committed Jan 31, 2024
1 parent 34ee1e9 commit 94e76e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions misc/snapshotter/snapshotter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ function get_container_runtime() {
else
echo "k3s"
fi
elif nsenter -t 1 -m systemctl is-active --quiet k0scontroller; then
echo "k0s-controller"
elif nsenter -t 1 -m systemctl is-active --quiet k0sworker; then
echo "k0s-worker"
else
echo "$runtime" | awk -F '[:]' '{print $1}'
fi
Expand Down

0 comments on commit 94e76e3

Please sign in to comment.