Skip to content

Commit

Permalink
Merge pull request #83 from jingyuanliang/master
Browse files Browse the repository at this point in the history
Switch base image to k8s.gcr.io/build-image/distroless-iptables:v0.1.1
  • Loading branch information
k8s-ci-robot authored Aug 4, 2022
2 parents f70194c + 9f70ff5 commit 7acd8d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ HTTPS_PROXY ?=
OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))

BASEIMAGE ?= k8s.gcr.io/build-image/debian-iptables:bullseye-v1.5.0
BASEIMAGE ?= k8s.gcr.io/build-image/distroless-iptables:v0.1.1

TAG := $(VERSION)__$(OS)_$(ARCH)

Expand Down Expand Up @@ -207,6 +207,12 @@ $(LICENSES): | $(BUILD_DIRS)
./bin/tools/go-licenses save ./... --save_path=$(LICENSES)
chmod -R a+rx $(LICENSES)

# Create a buildx builder which will create cross platform builds.
# The default builder does not support multi-arch.
.PHONY: buildx-setup
buildx-setup:
docker buildx inspect img-builder > /dev/null || docker buildx create --name img-builder --use

CONTAINER_DOTFILES = $(foreach bin,$(BINS),.container-$(subst /,_,$(REGISTRY)/$(bin))-$(TAG))

# We print the container names here, rather than in CONTAINER_DOTFILES so
Expand All @@ -228,16 +234,17 @@ $(foreach bin,$(BINS),$(eval \
))
# This is the target definition for all container-dotfiles.
# These are used to track build state in hidden files.
$(CONTAINER_DOTFILES):
$(CONTAINER_DOTFILES): buildx-setup
echo
sed \
-e 's|{ARG_BIN}|$(BIN)$(BIN_EXTENSION)|g' \
-e 's|{ARG_ARCH}|$(ARCH)|g' \
-e 's|{ARG_OS}|$(OS)|g' \
-e 's|{ARG_FROM}|$(BASEIMAGE)|g' \
Dockerfile.in > .dockerfile-$(BIN)-$(OS)_$(ARCH)
docker build \
docker buildx build \
--no-cache \
--load --platform $(OS)/$(ARCH) \
-t $(REGISTRY)/$(BIN):$(TAG) \
-f .dockerfile-$(BIN)-$(OS)_$(ARCH) \
.
Expand Down
2 changes: 1 addition & 1 deletion ip-masq-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
hostNetwork: true
containers:
- name: ip-masq-agent
image: k8s.gcr.io/networking/ip-masq-agent:v2.7.1
image: k8s.gcr.io/networking/ip-masq-agent:v2.8.0
securityContext:
privileged: false
capabilities:
Expand Down

0 comments on commit 7acd8d1

Please sign in to comment.