Skip to content
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

PE-5083: add support for provider-nodeadm #297

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ARG OSBUILDER_IMAGE=quay.io/kairos/osbuilder-tools:$OSBUILDER_VERSION
ARG K3S_PROVIDER_VERSION=v4.5.0
ARG KUBEADM_PROVIDER_VERSION=v4.5.0
ARG RKE2_PROVIDER_VERSION=v4.5.0
ARG NODEADM_PROVIDER_VERSION=v4.5.0

# Variables used in the builds. Update for ADVANCED use cases only. Modify in .arg file or via CLI arguments.
ARG OS_DISTRIBUTION
Expand Down Expand Up @@ -152,7 +153,7 @@ build-provider-images:
FROM $ALPINE_IMG

IF [ !-n "$K8S_DISTRIBUTION"]
RUN echo "K8S_DISTRIBUTION is not set. Please set K8S_DISTRIBUTION to kubeadm, kubeadm-fips, k3s, or rke2." && exit 1
RUN echo "K8S_DISTRIBUTION is not set. Please set K8S_DISTRIBUTION to kubeadm, kubeadm-fips, k3s, nodeadm, or rke2." && exit 1
END

IF [ "$IS_UKI" = "true" ]
Expand Down Expand Up @@ -231,7 +232,7 @@ install-k8s:
FROM --platform=linux/${ARCH} $ALPINE_IMG
COPY (+third-party/luet --binary=luet) /usr/bin/luet

IF [ "$K8S_DISTRIBUTION" = "kubeadm" ] || [ "$K8S_DISTRIBUTION" = "kubeadm-fips" ]
IF [ "$K8S_DISTRIBUTION" = "kubeadm" ] || [ "$K8S_DISTRIBUTION" = "kubeadm-fips" ] || [ "$K8S_DISTRIBUTION" = "nodeadm" ]
ARG BASE_K8S_VERSION=$K8S_VERSION
ELSE IF [ "$K8S_DISTRIBUTION" = "k3s" ]
ARG K8S_DISTRIBUTION_TAG=$K3S_FLAVOR_TAG
Expand Down Expand Up @@ -488,7 +489,7 @@ provider-image:
# added PROVIDER_K8S_VERSION to fix missing image in ghcr.io/kairos-io/provider-*
ARG IMAGE_REPO

IF [ "$K8S_DISTRIBUTION" = "kubeadm" ] || [ "$K8S_DISTRIBUTION" = "kubeadm-fips" ]
IF [ "$K8S_DISTRIBUTION" = "kubeadm" ] || [ "$K8S_DISTRIBUTION" = "kubeadm-fips" ] || [ "$K8S_DISTRIBUTION" = "nodeadm" ]
ARG BASE_K8S_VERSION=$K8S_VERSION
IF [ "$OS_DISTRIBUTION" = "ubuntu" ] && [ "$ARCH" = "amd64" ] && [ "$K8S_DISTRIBUTION" = "kubeadm" ]
RUN kernel=$(ls /lib/modules | tail -n1) && if ! ls /usr/src | grep linux-headers-$kernel; then apt-get update && apt-get install -y "linux-headers-${kernel}"; fi
Expand Down Expand Up @@ -594,6 +595,8 @@ kairos-provider-image:
ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/edge/kairos-io/provider-rke2:$RKE2_PROVIDER_VERSION
ELSE IF [ "$K8S_DISTRIBUTION" = "rke2" ]
ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/edge/kairos-io/provider-rke2:$RKE2_PROVIDER_VERSION
ELSE IF [ "$K8S_DISTRIBUTION" = "nodeadm" ]
ARG PROVIDER_BASE=$SPECTRO_PUB_REPO/edge/kairos-io/provider-nodeadm:$NODEADM_PROVIDER_VERSION
END
FROM --platform=linux/${ARCH} $PROVIDER_BASE
SAVE ARTIFACT ./*
Expand Down
4 changes: 4 additions & 0 deletions k8s_version.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,9 @@
"1.29.9",
"1.30.4",
"1.30.5"
],
"nodeadm": [
"1.29.0",
"1.30.0"
]
}