Skip to content
Open
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
7 changes: 7 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,13 @@ provider-image:
IF [ "$OS_DISTRIBUTION" = "ubuntu" ] && [ "$ARCH" = "amd64" ] && [ "$K8S_DISTRIBUTION" = "kubeadm" ]
RUN kernel=$(printf '%s\n' /lib/modules/* | xargs -n1 basename | sort -V | tail -1) && if ! ls /usr/src | grep linux-headers-$kernel; then apt-get update && apt-get install -y "linux-headers-${kernel}"; fi
END
# For FIPS builds, install headers for the FIPS kernel
IF [ "$OS_DISTRIBUTION" = "ubuntu" ] && [ "$ARCH" = "amd64" ] && [ "$K8S_DISTRIBUTION" = "kubeadm-fips" ]
RUN kernel=$(printf '%s\n' /lib/modules/* | xargs -n1 basename | grep fips | head -1) && \
if [ -n "$kernel" ] && ! ls /usr/src | grep -q "linux-headers-$kernel"; then \
apt-get update && apt-get install -y "linux-headers-${kernel}"; \
fi
END
ELSE IF [ "$K8S_DISTRIBUTION" = "k3s" ]
ARG K8S_DISTRIBUTION_TAG=$K3S_FLAVOR_TAG
ARG BASE_K8S_VERSION=$K8S_VERSION-$K8S_DISTRIBUTION_TAG
Expand Down