From a2375d79f3b32ac0b966bfa222ecb506dc0e7239 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Mon, 10 Jun 2024 16:05:49 -0400 Subject: [PATCH 01/16] Remove kubectl stuff (cherry picked from commit c1c8056060f961b9955a930d13db2d1347707f97) (cherry picked from commit 0123ae1ef4a428eb394bd8dd1ac0132393c4752e) --- hack/make/deps.mk | 6 ------ package/Dockerfile | 11 +---------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/hack/make/deps.mk b/hack/make/deps.mk index 29f0de0..d45d5e2 100644 --- a/hack/make/deps.mk +++ b/hack/make/deps.mk @@ -1,11 +1,6 @@ # renovate: datasource=github-release-attachments depName=rancher/helm HELM_VERSION := v3.15.1-rancher2 -KUBECTL_VERSION := v1.28.11 -KUBECTL_SUM_arm64 ?= $(shell curl -L "https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/linux/arm64/kubectl.sha256") -KUBECTL_SUM_amd64 ?= $(shell curl -L "https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/linux/amd64/kubectl.sha256") -KUBECTL_SUM_s390x ?= $(shell curl -L "https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/linux/s390x/kubectl.sha256") - # renovate: datasource=github-release-attachments depName=kubernetes-sigs/kustomize extractVersion=kustomize/v(?\d+\.\d+\.\d+) KUSTOMIZE_VERSION := v5.4.2 # renovate: datasource=github-release-attachments depName=kubernetes-sigs/kustomize versioning=regex:^kustomize/v(?\d+)\.(?\d+)\.(?\d+)$ digestVersion=kustomize/v5.4.1 @@ -26,6 +21,5 @@ K9S_SUM_s390x := 8aea75262492a699c150833cafc65465541c74becc1b0236b4a7e368f5bd512 # Reduces the code duplication on Makefile by keeping all args into a single variable. IMAGE_ARGS := --build-arg HELM_VERSION=$(HELM_VERSION) \ - --build-arg KUBECTL_VERSION=$(KUBECTL_VERSION) --build-arg KUBECTL_SUM_arm64=$(KUBECTL_SUM_arm64) --build-arg KUBECTL_SUM_amd64=$(KUBECTL_SUM_amd64) --build-arg KUBECTL_SUM_s390x=$(KUBECTL_SUM_s390x) \ --build-arg KUSTOMIZE_VERSION=$(KUSTOMIZE_VERSION) --build-arg KUSTOMIZE_SUM_arm64=$(KUSTOMIZE_SUM_arm64) --build-arg KUSTOMIZE_SUM_amd64=$(KUSTOMIZE_SUM_amd64) --build-arg KUSTOMIZE_SUM_s390x=$(KUSTOMIZE_SUM_s390x) \ --build-arg K9S_VERSION=$(K9S_VERSION) --build-arg K9S_SUM_arm64=$(K9S_SUM_arm64) --build-arg K9S_SUM_amd64=$(K9S_SUM_amd64) --build-arg K9S_SUM_s390x=$(K9S_SUM_s390x) diff --git a/package/Dockerfile b/package/Dockerfile index a665abc..2380b69 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -24,19 +24,10 @@ FROM --platform=$BUILDPLATFORM registry.suse.com/bci/bci-base:${BCI_VERSION} AS RUN zypper -n install curl gzip tar # Define build arguments -ARG KUBECTL_VERSION KUBECTL_SUM_arm64 KUBECTL_SUM_amd64 KUBECTL_SUM_s390x \ - KUSTOMIZE_VERSION KUSTOMIZE_SUM_arm64 KUSTOMIZE_SUM_amd64 KUSTOMIZE_SUM_s390x \ +ARG KUBECTL_VERSION KUSTOMIZE_VERSION KUSTOMIZE_SUM_arm64 KUSTOMIZE_SUM_amd64 KUSTOMIZE_SUM_s390x \ K9S_VERSION K9S_SUM_arm64 K9S_SUM_amd64 K9S_SUM_s390x ARG TARGETARCH -# Stage kubectl into build -ADD --chown=root:root --chmod=0755 \ - "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl" \ - /kubectl - -ENV KUBECTL_SUM="KUBECTL_SUM_${TARGETARCH}" -RUN echo "${!KUBECTL_SUM} /kubectl" | sha256sum -c - - # Stage kubectl into build ENV KUSTOMIZE_SUM="KUSTOMIZE_SUM_${TARGETARCH}" RUN curl --output /tmp/kustomize.tar.gz -sLf "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_${TARGETARCH}.tar.gz" && \ From a261b79c2cc216b73586f02d2055c4e473dcc68a Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Mon, 10 Jun 2024 16:06:11 -0400 Subject: [PATCH 02/16] pull in kuberlr and kubectl from kuberlr for matching rancher branch (cherry picked from commit 0a01558c33cb8e4440bdc443512991a8a9b94c5f) --- package/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/Dockerfile b/package/Dockerfile index 2380b69..45d9ba1 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -40,6 +40,7 @@ RUN curl --output /tmp/k9s.tar.gz -sLf "https://github.com/derailed/k9s/releases echo "${!K9S_SUM} /tmp/k9s.tar.gz" | sha256sum -c - && \ tar -xvzf /tmp/k9s.tar.gz -C / k9s +FROM --platform=$BUILDPLATFORM mallardduck/rancher-kuberlr:v2.0.0-rc.4 as kuberlr FROM registry.suse.com/bci/bci-base:${BCI_VERSION} as zypper # Creates the based dir for the target image, and hydrades it with the @@ -68,6 +69,11 @@ RUN echo 'shell:x:1000:1000:shell,,,:/home/shell:/bin/bash' > /chroot/etc/passwd echo 'LANG=en_US.UTF-8' >> /chroot/home/shell/.bashrc && \ echo 'PS1="> "' >> /chroot/home/shell/.bashrc && \ mkdir /chroot/home/shell/.kube && \ + mkdir /chroot/home/shell/.kuberlr && \ + touch /chroot/home/shell/.kuberlr/kuberlr.conf && \ + echo "AllowDownload = false" >> /chroot/home/shell/.kuberlr/kuberlr.conf && \ + echo 'SystemPath = "/usr/bin"' >> /chroot/home/shell/.kuberlr/kuberlr.conf && \ + echo "Timeout = 6" >> /chroot/home/shell/.kuberlr/kuberlr.conf && \ chown -R 1000:1000 /chroot/home/shell && \ chmod 700 /chroot/run @@ -76,6 +82,8 @@ FROM scratch COPY --from=zypper /chroot / COPY --chown=root:root --chmod=0755 --from=helm /helm/bin/helm /usr/local/bin/ COPY --chown=root:root --chmod=0755 --from=build /kubectl /k9s /kustomize* /usr/local/bin/ +COPY --chown=root:root --chmod=0755 --from=kuberlr /usr/bin/kubectl* /usr/bin/ +COPY --chown=root:root --chmod=0755 --from=kuberlr /bin/kuberlr /bin/kubectl /bin/ COPY --chown=root:root --chmod=0755 package/helm-cmd package/welcome /usr/local/bin/ COPY --chown=1000:1000 --chmod=0755 package/kustomize.sh /home/shell/ From 24a936dcef65379d5dc97f1000b0679a962ddbd6 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Mon, 10 Jun 2024 16:20:25 -0400 Subject: [PATCH 03/16] update readme for kuberlr (cherry picked from commit ca24dbd10f3585daba21af2b55cd1581fead9b1a) (cherry picked from commit b920ed8fb0577036397c64291af3fe495bd62d0a) --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 11dd97d..0aa30db 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,21 @@ This is the current branch strategy for `rancher/shell`, it may change in the fu This branch supports Rancher 2.9 and spans supporting k8s 1.27 through 1.30. Here are the current component versions and their k8s support: +| Component | Version | Supported K8s | +|-------------|-----------------------------------------|-----------------------------------------------| +| `kuberlr` | `v0.4.5` | n/a | +| `kubectl` | `v1.27.x`,`v1.28.x`,`v1.29.x`,`v1.30.x` | `1.26`-`1.31` | +| `kustomize` | `v5.4.x` | n/a | +| `helm` | `v3.15.1-rancher2` | `1.27`-`1.30` (based on upstream helm policy) | +| `k9s` | `v0.32.4` | Uses `client-go` v0.29.3 | + + +#### Pre-Kuberlr +> These docs are preserved during the transition to kuberlr. + +This branch supports Rancher 2.9 and spans supporting k8s 1.27 through 1.30. +Here are the current component versions and their k8s support: + | Component | Version | Supported K8s | |-------------|--------------------|----------------------------| | `kubectl` | `v1.28.x` | `1.27`,`1.28`,`1.29` | From 29714a8a7c720ac368e201f1c8592f6ab755b564 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Mon, 10 Jun 2024 16:23:18 -0400 Subject: [PATCH 04/16] don't copy kubectl that doesn't exist anymore (cherry picked from commit 6325b92bbe915f24dc7480f38a66ef2f7913f31b) (cherry picked from commit 1e99bed448c8ad39cbbc30d3c4152cc879d7e4a7) --- package/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/Dockerfile b/package/Dockerfile index 45d9ba1..7218123 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -81,7 +81,7 @@ FROM scratch COPY --from=zypper /chroot / COPY --chown=root:root --chmod=0755 --from=helm /helm/bin/helm /usr/local/bin/ -COPY --chown=root:root --chmod=0755 --from=build /kubectl /k9s /kustomize* /usr/local/bin/ +COPY --chown=root:root --chmod=0755 --from=build /k9s /kustomize* /usr/local/bin/ COPY --chown=root:root --chmod=0755 --from=kuberlr /usr/bin/kubectl* /usr/bin/ COPY --chown=root:root --chmod=0755 --from=kuberlr /bin/kuberlr /bin/kubectl /bin/ COPY --chown=root:root --chmod=0755 package/helm-cmd package/welcome /usr/local/bin/ From 148040052000c2a910b096c7d06c3753fe457476 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Mon, 10 Jun 2024 16:31:38 -0400 Subject: [PATCH 05/16] adjust for more removed kubectl things (cherry picked from commit d59d73400474a9fe70d9186b7ec0fae7574eebd7) (cherry picked from commit 47ad79520f53b26d2cd4ef66c84a04dc83518c43) --- Makefile | 5 +++-- hack/test | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index caa0ea9..93a4588 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,9 @@ clean: ## clean up project. test: test-build ## test the build against all target platforms. $(MAKE) image-build IMAGE=$(IMAGE) \ - KUBECTL_VERSION=$(KUBECTL_VERSION) HELM_VERSION=$(HELM_VERSION) \ - KUSTOMIZE_VERSION=$(KUSTOMIZE_VERSION) K9S_VERSION=$(K9S_VERSION) \ + HELM_VERSION=$(HELM_VERSION) \ + KUSTOMIZE_VERSION=$(KUSTOMIZE_VERSION) \ + K9S_VERSION=$(K9S_VERSION) \ ./hack/test test-build: diff --git a/hack/test b/hack/test index fc40c58..9f05283 100755 --- a/hack/test +++ b/hack/test @@ -34,7 +34,8 @@ function check_files(){ expected_file "/usr/local/bin/helm" "0:0" "755" expected_file "/usr/local/bin/helm-cmd" "0:0" "755" expected_file "/usr/local/bin/k9s" "0:0" "755" - expected_file "/usr/local/bin/kubectl" "0:0" "755" + expected_file "/usr/bin/kuberlr" "0:0" "755" + expected_file "/usr/bin/kubectl" "0:0" "755" expected_file "/usr/local/bin/kustomize" "0:0" "755" expected_file "/usr/local/bin/welcome" "0:0" "755" expected_file "/home/shell/kustomize.sh" "1000:1000" "755" @@ -64,9 +65,6 @@ function check_versions(){ expected_version "helm" "${HELM_VERSION}" expected_version "kustomize" "${KUSTOMIZE_VERSION}" expected_version "k9s" "${K9S_VERSION}" - # --client=true is used so that it does not fail trying to - # identify the server version. - expected_version "kubectl --client=true" "${KUBECTL_VERSION}" } function main(){ From 344f8f164e3470ec5de3c88b18c81984aa87eef1 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Mon, 10 Jun 2024 16:31:54 -0400 Subject: [PATCH 06/16] put kubectl bins into /usr/local/bin instead (cherry picked from commit d677aa76d966e8c587a04c5ca8835a97ed297896) --- package/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/Dockerfile b/package/Dockerfile index 7218123..13272e3 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -72,7 +72,7 @@ RUN echo 'shell:x:1000:1000:shell,,,:/home/shell:/bin/bash' > /chroot/etc/passwd mkdir /chroot/home/shell/.kuberlr && \ touch /chroot/home/shell/.kuberlr/kuberlr.conf && \ echo "AllowDownload = false" >> /chroot/home/shell/.kuberlr/kuberlr.conf && \ - echo 'SystemPath = "/usr/bin"' >> /chroot/home/shell/.kuberlr/kuberlr.conf && \ + echo 'SystemPath = "/usr/local/bin"' >> /chroot/home/shell/.kuberlr/kuberlr.conf && \ echo "Timeout = 6" >> /chroot/home/shell/.kuberlr/kuberlr.conf && \ chown -R 1000:1000 /chroot/home/shell && \ chmod 700 /chroot/run @@ -82,7 +82,7 @@ FROM scratch COPY --from=zypper /chroot / COPY --chown=root:root --chmod=0755 --from=helm /helm/bin/helm /usr/local/bin/ COPY --chown=root:root --chmod=0755 --from=build /k9s /kustomize* /usr/local/bin/ -COPY --chown=root:root --chmod=0755 --from=kuberlr /usr/bin/kubectl* /usr/bin/ +COPY --chown=root:root --chmod=0755 --from=kuberlr /usr/bin/kubectl* /usr/local/bin/ COPY --chown=root:root --chmod=0755 --from=kuberlr /bin/kuberlr /bin/kubectl /bin/ COPY --chown=root:root --chmod=0755 package/helm-cmd package/welcome /usr/local/bin/ COPY --chown=1000:1000 --chmod=0755 package/kustomize.sh /home/shell/ From 050c4a6c490942271f39344e78b8b630ea5e1398 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Mon, 10 Jun 2024 16:37:09 -0400 Subject: [PATCH 07/16] fix test (cherry picked from commit f2e02c6f1debfc70ec368df069abf98bef518118) (cherry picked from commit d0fa14341eb7f736bf6db39ca78e2a725b19ff47) --- hack/test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/test b/hack/test index 9f05283..bb37fb8 100755 --- a/hack/test +++ b/hack/test @@ -34,8 +34,8 @@ function check_files(){ expected_file "/usr/local/bin/helm" "0:0" "755" expected_file "/usr/local/bin/helm-cmd" "0:0" "755" expected_file "/usr/local/bin/k9s" "0:0" "755" - expected_file "/usr/bin/kuberlr" "0:0" "755" - expected_file "/usr/bin/kubectl" "0:0" "755" + expected_file "/bin/kuberlr" "0:0" "755" + expected_file "/bin/kubectl" "0:0" "755" expected_file "/usr/local/bin/kustomize" "0:0" "755" expected_file "/usr/local/bin/welcome" "0:0" "755" expected_file "/home/shell/kustomize.sh" "1000:1000" "755" From 037d0266de2f90c85e9b41957b0cc7db7cb6b9ed Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Mon, 10 Jun 2024 16:45:14 -0400 Subject: [PATCH 08/16] fix symlink (cherry picked from commit 2440b9b695cc674eac4c527e79c12e2641cbbe5f) (cherry picked from commit c6c3df3ead1ec39ba073b48513cb03a83e1a626c) --- package/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/Dockerfile b/package/Dockerfile index 13272e3..e32620c 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -83,7 +83,8 @@ COPY --from=zypper /chroot / COPY --chown=root:root --chmod=0755 --from=helm /helm/bin/helm /usr/local/bin/ COPY --chown=root:root --chmod=0755 --from=build /k9s /kustomize* /usr/local/bin/ COPY --chown=root:root --chmod=0755 --from=kuberlr /usr/bin/kubectl* /usr/local/bin/ -COPY --chown=root:root --chmod=0755 --from=kuberlr /bin/kuberlr /bin/kubectl /bin/ +COPY --chown=root:root --chmod=0755 --from=kuberlr /bin/kuberlr /bin/ +RUN ln -s /bin/kuberlr /bin/kubectl COPY --chown=root:root --chmod=0755 package/helm-cmd package/welcome /usr/local/bin/ COPY --chown=1000:1000 --chmod=0755 package/kustomize.sh /home/shell/ From dfa1a5999601bb6c6f37b16a3e1a309c962a33d1 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Mon, 10 Jun 2024 16:50:20 -0400 Subject: [PATCH 09/16] fix test for symlink (cherry picked from commit ccdb8e3ae53186b0b6f2f821427a8d1b26adfd41) (cherry picked from commit bfc3c470c01d6eb230b729ab751ad93ba69c6c9b) --- hack/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/test b/hack/test index bb37fb8..6af2ccf 100755 --- a/hack/test +++ b/hack/test @@ -35,7 +35,7 @@ function check_files(){ expected_file "/usr/local/bin/helm-cmd" "0:0" "755" expected_file "/usr/local/bin/k9s" "0:0" "755" expected_file "/bin/kuberlr" "0:0" "755" - expected_file "/bin/kubectl" "0:0" "755" + expected_file "/bin/kubectl" "0:0" "777" expected_file "/usr/local/bin/kustomize" "0:0" "755" expected_file "/usr/local/bin/welcome" "0:0" "755" expected_file "/home/shell/kustomize.sh" "1000:1000" "755" From 20389e259d46bb29a4c42d9cd38ee39f944a8e04 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Mon, 17 Jun 2024 14:01:21 -0400 Subject: [PATCH 10/16] update kuberlr base (cherry picked from commit e8569f9a3a22576566cb23fad84d7aa9b5249be0) --- package/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/Dockerfile b/package/Dockerfile index e32620c..46f39d7 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -40,7 +40,9 @@ RUN curl --output /tmp/k9s.tar.gz -sLf "https://github.com/derailed/k9s/releases echo "${!K9S_SUM} /tmp/k9s.tar.gz" | sha256sum -c - && \ tar -xvzf /tmp/k9s.tar.gz -C / k9s -FROM --platform=$BUILDPLATFORM mallardduck/rancher-kuberlr:v2.0.0-rc.4 as kuberlr +# Set the base kuberlr image to pull kuberlr and kubectl from +ARG KUBERLR_VERSION=v2.0.0-rc.6 +FROM --platform=$BUILDPLATFORM mallardduck/rancher-kuberlr:${KUBERLR_VERSION} as kuberlr FROM registry.suse.com/bci/bci-base:${BCI_VERSION} as zypper # Creates the based dir for the target image, and hydrades it with the From 2fbe8c55d4582805c48032d72111ed7895ff6367 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Thu, 20 Jun 2024 14:14:19 -0400 Subject: [PATCH 11/16] adjust where kuberlr image is pulled (cherry picked from commit 996abd8b235696b3f0fcfb4cd3845ab53c8b177a) --- package/Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/package/Dockerfile b/package/Dockerfile index 46f39d7..0218201 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -1,6 +1,10 @@ ARG BCI_VERSION=15.6 FROM registry.suse.com/bci/bci-busybox:${BCI_VERSION} as final +# Set the base kuberlr image to pull kuberlr and kubectl from +ARG KUBERLR_VERSION="v2.0.0-rc.6" +FROM --platform=$BUILDPLATFORM mallardduck/rancher-kuberlr:${KUBERLR_VERSION} as kuberlr + # Image that provides cross compilation tooling. FROM --platform=$BUILDPLATFORM rancher/mirrored-tonistiigi-xx:1.3.0 as xx @@ -40,11 +44,6 @@ RUN curl --output /tmp/k9s.tar.gz -sLf "https://github.com/derailed/k9s/releases echo "${!K9S_SUM} /tmp/k9s.tar.gz" | sha256sum -c - && \ tar -xvzf /tmp/k9s.tar.gz -C / k9s -# Set the base kuberlr image to pull kuberlr and kubectl from -ARG KUBERLR_VERSION=v2.0.0-rc.6 -FROM --platform=$BUILDPLATFORM mallardduck/rancher-kuberlr:${KUBERLR_VERSION} as kuberlr -FROM registry.suse.com/bci/bci-base:${BCI_VERSION} as zypper - # Creates the based dir for the target image, and hydrades it with the # original contents of the final image. RUN mkdir /chroot From cd442b8a5fd9b63d6e749666eb3526622b0f7ca6 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Thu, 20 Jun 2024 14:28:02 -0400 Subject: [PATCH 12/16] Fix default args quirk on docker builder (cherry picked from commit e9a040918735bee3bf455be3006ebb66a560c569) --- package/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package/Dockerfile b/package/Dockerfile index 0218201..117d4ab 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -1,9 +1,7 @@ ARG BCI_VERSION=15.6 -FROM registry.suse.com/bci/bci-busybox:${BCI_VERSION} as final - -# Set the base kuberlr image to pull kuberlr and kubectl from ARG KUBERLR_VERSION="v2.0.0-rc.6" FROM --platform=$BUILDPLATFORM mallardduck/rancher-kuberlr:${KUBERLR_VERSION} as kuberlr +FROM registry.suse.com/bci/bci-busybox:${BCI_VERSION} as final # Image that provides cross compilation tooling. FROM --platform=$BUILDPLATFORM rancher/mirrored-tonistiigi-xx:1.3.0 as xx From 43e20896efaf9b1821ee210ac9d3bbd545b88e2f Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Thu, 20 Jun 2024 14:28:33 -0400 Subject: [PATCH 13/16] correct AS text capitalization (cherry picked from commit 86564ee380a8ee136808cf07796c7d1a59a4ce4e) --- package/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/Dockerfile b/package/Dockerfile index 117d4ab..12d141c 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -1,12 +1,12 @@ ARG BCI_VERSION=15.6 ARG KUBERLR_VERSION="v2.0.0-rc.6" -FROM --platform=$BUILDPLATFORM mallardduck/rancher-kuberlr:${KUBERLR_VERSION} as kuberlr -FROM registry.suse.com/bci/bci-busybox:${BCI_VERSION} as final +FROM --platform=$BUILDPLATFORM mallardduck/rancher-kuberlr:${KUBERLR_VERSION} AS kuberlr +FROM registry.suse.com/bci/bci-busybox:${BCI_VERSION} AS final # Image that provides cross compilation tooling. -FROM --platform=$BUILDPLATFORM rancher/mirrored-tonistiigi-xx:1.3.0 as xx +FROM --platform=$BUILDPLATFORM rancher/mirrored-tonistiigi-xx:1.3.0 AS xx -FROM --platform=$BUILDPLATFORM registry.suse.com/bci/golang:1.22 as helm +FROM --platform=$BUILDPLATFORM registry.suse.com/bci/golang:1.22 AS helm # Clone repository once, and reuse it for target archs. ARG HELM_VERSION From 5f838fa693bdee100fcfe0b6ee8f5738085588a9 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Thu, 20 Jun 2024 14:28:52 -0400 Subject: [PATCH 14/16] fix missing layer and comment name (cherry picked from commit a01ad9e34299722c4e47b15aa6a7c5cee9bb9880) --- package/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/Dockerfile b/package/Dockerfile index 12d141c..ea98260 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -30,7 +30,7 @@ ARG KUBECTL_VERSION KUSTOMIZE_VERSION KUSTOMIZE_SUM_arm64 KUSTOMIZE_SUM_amd64 KU K9S_VERSION K9S_SUM_arm64 K9S_SUM_amd64 K9S_SUM_s390x ARG TARGETARCH -# Stage kubectl into build +# Stage kustomize into build ENV KUSTOMIZE_SUM="KUSTOMIZE_SUM_${TARGETARCH}" RUN curl --output /tmp/kustomize.tar.gz -sLf "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_${TARGETARCH}.tar.gz" && \ echo "${!KUSTOMIZE_SUM} /tmp/kustomize.tar.gz" | sha256sum -c - && \ @@ -42,6 +42,8 @@ RUN curl --output /tmp/k9s.tar.gz -sLf "https://github.com/derailed/k9s/releases echo "${!K9S_SUM} /tmp/k9s.tar.gz" | sha256sum -c - && \ tar -xvzf /tmp/k9s.tar.gz -C / k9s +FROM registry.suse.com/bci/bci-base:${BCI_VERSION} as zypper + # Creates the based dir for the target image, and hydrades it with the # original contents of the final image. RUN mkdir /chroot From 2daa9473b162a0fd8e7d2776e3fc8751f57896ff Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Thu, 20 Jun 2024 15:28:28 -0400 Subject: [PATCH 15/16] fix another as => AS (cherry picked from commit 74e5007152017674f19d2f6c52ab511dc45fd055) --- package/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/Dockerfile b/package/Dockerfile index ea98260..f9b0618 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -42,7 +42,7 @@ RUN curl --output /tmp/k9s.tar.gz -sLf "https://github.com/derailed/k9s/releases echo "${!K9S_SUM} /tmp/k9s.tar.gz" | sha256sum -c - && \ tar -xvzf /tmp/k9s.tar.gz -C / k9s -FROM registry.suse.com/bci/bci-base:${BCI_VERSION} as zypper +FROM registry.suse.com/bci/bci-base:${BCI_VERSION} AS zypper # Creates the based dir for the target image, and hydrades it with the # original contents of the final image. From b7d579840eaf22236982ae3720b0832781e0b7c5 Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Fri, 19 Jul 2024 18:17:24 -0400 Subject: [PATCH 16/16] update to use new image base for kuberlr --- package/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package/Dockerfile b/package/Dockerfile index f9b0618..4f2f9f4 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -1,6 +1,5 @@ ARG BCI_VERSION=15.6 -ARG KUBERLR_VERSION="v2.0.0-rc.6" -FROM --platform=$BUILDPLATFORM mallardduck/rancher-kuberlr:${KUBERLR_VERSION} AS kuberlr +FROM --platform=$BUILDPLATFORM mallardduck/rancher-kuberlr-kubectl:v2.0.0-beta.2 AS kuberlr FROM registry.suse.com/bci/bci-busybox:${BCI_VERSION} AS final # Image that provides cross compilation tooling.