Skip to content

Commit

Permalink
Merge pull request #2301 from BenTheElder/iptables-runner
Browse files Browse the repository at this point in the history
add go-runner to debian-iptables image
  • Loading branch information
k8s-ci-robot authored Nov 10, 2021
2 parents 8d2a138 + 98a78b4 commit b7bf468
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
8 changes: 7 additions & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,19 @@ dependencies:
match: "DEBIAN_BASE_VERSION: '(bullseye|buster)-v((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)'"

- name: "k8s.gcr.io/build-image/debian-iptables"
version: buster-v1.6.7
version: buster-v1.7.0
refPaths:
- path: images/build/debian-iptables/Makefile
match: IMAGE_VERSION\ \?=\ (bullseye|buster)-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)
- path: images/build/debian-iptables/variants.yaml
match: "IMAGE_VERSION: '(bullseye|buster)-v((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)'"

- name: "k8s.gcr.io/build-image/go-runner: dependents"
version: v2.3.1-go1.17.3-buster.0
refPaths:
- path: images/build/debian-iptables/Makefile
match: GORUNNER_VERSION \?= v\d+\.\d+\.\d+-go\d+.\d+(alpha|beta|rc)?\.?(\d+)?-(bullseye|buster)\.\d+

- name: "k8s.gcr.io/build-image/setcap"
version: buster-v2.0.4
refPaths:
Expand Down
5 changes: 4 additions & 1 deletion images/build/debian-iptables/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ REGISTRY?="gcr.io/k8s-staging-build-image"
IMAGE=$(REGISTRY)/debian-iptables

TAG ?= $(shell git describe --tags --always --dirty)
IMAGE_VERSION ?= buster-v1.6.7
IMAGE_VERSION ?= buster-v1.7.0
CONFIG ?= buster
DEBIAN_BASE_VERSION ?= buster-v1.9.0
GORUNNER_VERSION ?= v2.3.1-go1.17.3-buster.0

ARCH?=amd64
ALL_ARCH = amd64 arm arm64 ppc64le s390x
Expand All @@ -29,6 +30,7 @@ BASE_REGISTRY?=k8s.gcr.io/build-image

# Build args
BASEIMAGE?=$(BASE_REGISTRY)/debian-base-$(ARCH):$(DEBIAN_BASE_VERSION)
GORUNNERIMAGE?=$(BASE_REGISTRY)/go-runner:$(GORUNNER_VERSION)

QEMUVERSION=5.2.0-2

Expand All @@ -53,6 +55,7 @@ build:
-t $(IMAGE)-$(ARCH):$(TAG)-$(CONFIG) \
-t $(IMAGE)-$(ARCH):latest-$(CONFIG) \
--build-arg=BASEIMAGE=$(BASEIMAGE) \
--build-arg=GORUNNERIMAGE=$(GORUNNERIMAGE) \
$(CONFIG)
docker buildx rm $$BUILDER

Expand Down
8 changes: 7 additions & 1 deletion images/build/debian-iptables/buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

ARG BASEIMAGE
ARG GORUNNERIMAGE

FROM ${BASEIMAGE} as build

Expand Down Expand Up @@ -43,5 +44,10 @@ RUN update-alternatives \
--slave /usr/sbin/ip6tables-restore ip6tables-restore /usr/sbin/iptables-wrapper \
--slave /usr/sbin/ip6tables-save ip6tables-save /usr/sbin/iptables-wrapper

# we're going to borrow the /go-runner binary in the final image
# dedupe this binary by just copying it from the go-runner image
FROM ${GORUNNERIMAGE} as gorunner

FROM scratch
COPY --from=build / /
COPY --from=build / /
COPY --from=gorunner /go-runner /go-runner
2 changes: 1 addition & 1 deletion images/build/debian-iptables/variants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ variants:
# Debian 10 - Kubernetes 1.22 and older
buster:
CONFIG: 'buster'
IMAGE_VERSION: 'buster-v1.6.7'
IMAGE_VERSION: 'buster-v1.7.0'
DEBIAN_BASE_VERSION: 'buster-v1.9.0'

0 comments on commit b7bf468

Please sign in to comment.