From ba1e63306de68866c4af424d392ddd97cfa4d862a2870ec08b994c40fad8a10b Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Fri, 22 Nov 2024 10:35:49 +0200 Subject: [PATCH 1/4] Add missing kubectl image --- kubectl-image/Dockerfile | 34 ++++++++++++++++++++++++++++++++++ kubectl-image/_service | 10 ++++++++++ 2 files changed, 44 insertions(+) create mode 100644 kubectl-image/Dockerfile create mode 100644 kubectl-image/_service diff --git a/kubectl-image/Dockerfile b/kubectl-image/Dockerfile new file mode 100644 index 0000000..ada02a2 --- /dev/null +++ b/kubectl-image/Dockerfile @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: Apache-2.0 +#!BuildTag: %%IMG_PREFIX%%kubectl:1.30.3 +#!BuildTag: %%IMG_PREFIX%%kubectl:1.30.3-%RELEASE% +#!BuildVersion: 15.6 +ARG SLE_VERSION +FROM registry.suse.com/bci/bci-micro:$SLE_VERSION AS micro + +FROM registry.suse.com/bci/bci-base:$SLE_VERSION AS base +COPY --from=micro / /installroot/ +RUN zypper --installroot /installroot --non-interactive install --no-recommends kubectl-1303; zypper -n clean; rm -rf /var/log/* + +FROM micro AS final + +# Define labels according to https://en.opensuse.org/Building_derived_containers +# labelprefix=com.suse.application.kubectl +LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)" +LABEL org.opencontainers.image.title="SLE kubectl image" +LABEL org.opencontainers.image.description="kubectl on the SLE Base Container Image." +LABEL org.opencontainers.image.version="1.30.3" +LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.vendor="SUSE LLC" +LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%kubectl:1.30.3-%RELEASE%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL com.suse.supportlevel="l3" +LABEL com.suse.eula="SUSE Combined EULA February 2024" +LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle" +LABEL com.suse.image-type="application" +LABEL com.suse.release-stage="released" +# endlabelprefix + +COPY --from=base /installroot / + +ENTRYPOINT ["/usr/bin/kubectl"] diff --git a/kubectl-image/_service b/kubectl-image/_service new file mode 100644 index 0000000..0041dd1 --- /dev/null +++ b/kubectl-image/_service @@ -0,0 +1,10 @@ + + + + Dockerfile + IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %img_prefix) + IMG_PREFIX + IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo) + IMG_REPO + + -- 2.45.2 From d8949c42b68635d2516dc9f5744056a6473d85d961f9f5a5f0eff7a34a1f7414 Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Fri, 22 Nov 2024 10:45:09 +0200 Subject: [PATCH 2/4] Add support level templatisation --- kubectl-image/Dockerfile | 2 +- kubectl-image/_service | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kubectl-image/Dockerfile b/kubectl-image/Dockerfile index ada02a2..c4a4e5e 100644 --- a/kubectl-image/Dockerfile +++ b/kubectl-image/Dockerfile @@ -22,7 +22,7 @@ LABEL org.opencontainers.image.created="%BUILDTIME%" LABEL org.opencontainers.image.vendor="SUSE LLC" LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%kubectl:1.30.3-%RELEASE%" LABEL org.openbuildservice.disturl="%DISTURL%" -LABEL com.suse.supportlevel="l3" +LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%" LABEL com.suse.eula="SUSE Combined EULA February 2024" LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle" LABEL com.suse.image-type="application" diff --git a/kubectl-image/_service b/kubectl-image/_service index 0041dd1..c5ed22b 100644 --- a/kubectl-image/_service +++ b/kubectl-image/_service @@ -6,5 +6,7 @@ IMG_PREFIX IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo) IMG_REPO + SUPPORT_LEVEL=$(rpm --macros=/root/.rpmmacros -E %support_level) + SUPPORT_LEVEL -- 2.45.2 From e802ce1536a6f2c6ae951257e2dd2cb41f426b1ea5b15ea77cf95616a6e46369 Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Fri, 22 Nov 2024 10:46:40 +0200 Subject: [PATCH 3/4] Use correct img_prefix reference --- kubectl-image/_service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubectl-image/_service b/kubectl-image/_service index c5ed22b..2d99fa4 100644 --- a/kubectl-image/_service +++ b/kubectl-image/_service @@ -2,7 +2,7 @@ Dockerfile - IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %img_prefix) + IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %{?img_prefix}) IMG_PREFIX IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo) IMG_REPO -- 2.45.2 From c6b2cbea347fc8106f0e3063e41401015b6f79e9efad14346858ac66380cf4f0 Mon Sep 17 00:00:00 2001 From: Ivo Petrov Date: Fri, 22 Nov 2024 11:08:50 +0200 Subject: [PATCH 4/4] Add kubectl-image to workflows.yaml --- .obs/workflows.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.obs/workflows.yml b/.obs/workflows.yml index c6f0a53..82231a8 100644 --- a/.obs/workflows.yml +++ b/.obs/workflows.yml @@ -222,3 +222,7 @@ staging_build: source_package: frr-image source_project: isv:SUSE:Edge:Factory target_project: isv:SUSE:Edge:Factory:Staging + - branch_package: + source_package: kubectl-image + source_project: isv:SUSE:Edge:Factory + target_project: isv:SUSE:Edge:Factory:Staging -- 2.45.2