Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump multus version to v4.1.0 #64

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG GO_IMAGE=rancher/hardened-build-base:v1.21.11b3

# Image that provides cross compilation tooling.
FROM --platform=$BUILDPLATFORM rancher/mirrored-tonistiigi-xx:1.3.0 as xx

Check warning on line 4 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-arm64

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

FROM --platform=$BUILDPLATFORM ${GO_IMAGE} as base-builder

Check warning on line 6 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-arm64

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
# copy xx scripts to your build stage
COPY --from=xx / /
RUN apk add file make git clang lld patch
Expand All @@ -12,20 +12,14 @@
xx-apk --no-cache add musl-dev gcc lld

# Build the multus project
FROM base-builder as multus-builder

Check warning on line 15 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-arm64

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
ARG TAG=v4.0.2
ARG TAG=v4.1.0
ARG SRC=github.com/k8snetworkplumbingwg/multus-cni
ARG PKG=github.com/k8snetworkplumbingwg/multus-cni
RUN git clone --depth=1 https://${SRC}.git $GOPATH/src/${PKG}
WORKDIR $GOPATH/src/${PKG}
# patch to solve https://github.com/rancher/rke2/issues/4568
# to be removed once upstream merges the fix
# https://github.com/k8snetworkplumbingwg/multus-cni/pull/1137
COPY self_delegation_bug.patch /tmp

RUN git fetch --all --tags --prune && \
git checkout tags/${TAG} -b ${TAG} && \
git apply /tmp/self_delegation_bug.patch
git checkout tags/${TAG} -b ${TAG}
RUN go mod download
# cross-compilation setup
ARG TARGETARCH
Expand All @@ -34,14 +28,14 @@
./hack/build-go.sh
RUN xx-verify --static bin/thin_entrypoint bin/multus

FROM ${GO_IMAGE} as strip_binary

Check warning on line 31 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-arm64

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
#strip needs to run on TARGETPLATFORM, not BUILDPLATFORM
COPY --from=multus-builder /go/src/github.com/k8snetworkplumbingwg/multus-cni/bin/thin_entrypoint /thin_entrypoint
COPY --from=multus-builder /go/src/github.com/k8snetworkplumbingwg/multus-cni/bin/multus /multus
RUN strip /thin_entrypoint /multus

# Create the multus image
FROM scratch as multus-cni

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / build-arm64

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
COPY --from=strip_binary /multus /usr/src/multus-cni/bin/multus
COPY --from=multus-builder /go/src/github.com/k8snetworkplumbingwg/multus-cni/LICENSE /usr/src/multus-cni/LICENSE
COPY --from=strip_binary /thin_entrypoint /
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SRC ?= github.com/k8snetworkplumbingwg/multus-cni
TAG ?= ${GITHUB_ACTION_TAG}

ifeq ($(TAG),)
TAG := v4.0.2$(BUILD_META)
TAG := v4.1.0$(BUILD_META)
endif

ifeq (,$(filter %$(BUILD_META),$(TAG)))
Expand Down
36 changes: 0 additions & 36 deletions self_delegation_bug.patch

This file was deleted.