Install the right k3s package based on the init system (#1802)

* Install the right k3s package based on the init system

Fixes: #1797

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Bump luet repository to use the new packages

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Add FLAVOR ARG for consistency

although it's a global and it should work anyway. But we pass it in
other places so let's at least be consistent.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
Dimitris Karakasilis 2023-09-08 15:24:01 +03:00 committed by GitHub
parent aca4ee07b3
commit 536b26d987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -416,7 +416,7 @@ base-image:
IF [ "$VARIANT" = "standard" ]
DO +PROVIDER_INSTALL -PROVIDER_KAIROS_BRANCH=${PROVIDER_KAIROS_BRANCH}
DO +INSTALL_K3S
DO +INSTALL_K3S --FLAVOR=$FLAVOR
# Redo os-release with override settings to point to provider-kairos stuff
# in earthly 0.7 we will be able to just override VARIANT here and just run the OSRELEASE once
@ -1196,6 +1196,8 @@ PROVIDER_INSTALL:
INSTALL_K3S:
COMMAND
ARG FLAVOR
IF [ "$K3S_VERSION" = "" ]
RUN echo "$K3S_VERSION must be set" && exit 1
END
@ -1207,7 +1209,11 @@ INSTALL_K3S:
&& INSTALL_K3S_SELINUX_WARN=true INSTALL_K3S_SKIP_START="true" INSTALL_K3S_SKIP_ENABLE="true" INSTALL_K3S_SKIP_SELINUX_RPM="true" bash installer.sh agent \
&& rm -rf installer.sh
ELSE
ARG _LUET_K3S=$(echo k8s/k3s@${K3S_VERSION})
IF [[ "$FLAVOR" =~ ^alpine* ]]
ARG _LUET_K3S=$(echo k8s/k3s-openrc@${K3S_VERSION})
ELSE
ARG _LUET_K3S=$(echo k8s/k3s-systemd@${K3S_VERSION})
END
END
RUN luet install -y ${_LUET_K3S} utils/edgevpn utils/k9s utils/nerdctl container/kubectl utils/kube-vip

View File

@ -174,9 +174,9 @@ repositories:
priority: 2
urls:
- "quay.io/kairos/packages"
reference: 20230907140136-repository.yaml
reference: 20230908101147-repository.yaml
- !!merge <<: *kairos
arch: arm64
urls:
- "quay.io/kairos/packages-arm64"
reference: 20230907141836-repository.yaml
reference: 20230908101404-repository.yaml