From c91d452831a667fdfc9591e83b111f8fc862f8e5 Mon Sep 17 00:00:00 2001 From: Jugwan Eom Date: Thu, 2 May 2024 06:28:24 +0000 Subject: [PATCH] add support for 1.27 and 1.28 k8s bundles --- installer/bundle_builder/Dockerfile | 9 +++++++-- .../bundle_builder/ingredients/rpm/Dockerfile | 6 +++--- .../ingredients/rpm/download.sh | 20 +++++++------------ 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/installer/bundle_builder/Dockerfile b/installer/bundle_builder/Dockerfile index d3b0c2263..d99965733 100644 --- a/installer/bundle_builder/Dockerfile +++ b/installer/bundle_builder/Dockerfile @@ -16,7 +16,12 @@ # // Build and store a BYOH bundle # docker run --rm -v :/ingredients -v :/bundle --env -FROM k14s/image +# https://github.com/carvel-dev/docker-image/blob/develop/Dockerfile +FROM ubuntu +# perl is needed for shasum +RUN apt-get -y update && apt-get install -y wget perl ca-certificates && update-ca-certificates && rm -rf /var/lib/apt/lists/* +RUN bash -c "set -eo pipefail; wget -O- https://carvel.dev/install.sh | bash" +RUN ytt version && kapp version && kbld version && kwt version && imgpkg version && vendir version # If set to 1 bundle is built and available as bundle/bundle.tar # If set to 0 bundle is build and pushed to repo @@ -32,4 +37,4 @@ RUN mkdir /ingredients && mkdir /bundle ENV PATH="/bundle-builder:${PATH}" WORKDIR /tmp/bundle -ENTRYPOINT ["build-push-bundle.sh", "/ingredients", "/config"] +ENTRYPOINT ["build-push-bundle.sh", "/ingredients", "/config", "rpm"] diff --git a/installer/bundle_builder/ingredients/rpm/Dockerfile b/installer/bundle_builder/ingredients/rpm/Dockerfile index d9856f9e9..a0e8cae18 100644 --- a/installer/bundle_builder/ingredients/rpm/Dockerfile +++ b/installer/bundle_builder/ingredients/rpm/Dockerfile @@ -8,12 +8,12 @@ # 2. Run the image # -ARG BASE_IMAGE=rockylinux:8.7 +ARG BASE_IMAGE=rockylinux:8 FROM $BASE_IMAGE as build # Override to download other version -ENV CONTAINERD_VERSION=1.6.18 -ENV KUBERNETES_VERSION=1.25.11-0 +ENV CONTAINERD_VERSION=1.6.31 +ENV KUBERNETES_VERSION=1.28 ENV ARCH=x86_64 RUN dnf -y install sudo diff --git a/installer/bundle_builder/ingredients/rpm/download.sh b/installer/bundle_builder/ingredients/rpm/download.sh index dbb6fc85d..368052119 100644 --- a/installer/bundle_builder/ingredients/rpm/download.sh +++ b/installer/bundle_builder/ingredients/rpm/download.sh @@ -5,27 +5,21 @@ set -e -echo Update the apt package index and install packages needed to use the Kubernetes apt repository -sudo dnf install -y apt-transport-https ca-certificates curl +sudo dnf install -y 'dnf-command(download)' echo Download containerd curl -LOJR https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/cri-containerd-cni-${CONTAINERD_VERSION}-linux-amd64.tar.gz -echo Download the Google Cloud public signing key -sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://dl.k8s.io/apt/doc/apt-key.gpg - -echo Add the Kubernetes apt repository -sudo cat < /etc/yum.repos.d/kubernetes.repo +echo Add the Kubernetes repository +cat <