Skip to content

Commit

Permalink
Set default values to fix InvalidDefaultArgInFrom warning
Browse files Browse the repository at this point in the history
Signed-off-by: Lan Luo <[email protected]>
  • Loading branch information
luolanzone committed Oct 11, 2024
1 parent a419c8c commit 8531d9d
Show file tree
Hide file tree
Showing 21 changed files with 49 additions and 30 deletions.
3 changes: 2 additions & 1 deletion build/images/Dockerfile.agent.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG BUILD_TAG
# BUILD_TAG is expected to be overridden by CI build scripts
ARG BUILD_TAG=latest
FROM antrea/base-ubuntu:${BUILD_TAG}

LABEL maintainer="Antrea <[email protected]>"
Expand Down
5 changes: 3 additions & 2 deletions build/images/Dockerfile.build.agent.coverage
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
ARG BUILD_TAG
# GO_VERSION and BUILD_TAG are expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
ARG BUILD_TAG=latest
FROM golang:${GO_VERSION} AS antrea-build

WORKDIR /antrea
Expand Down
5 changes: 3 additions & 2 deletions build/images/Dockerfile.build.agent.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
ARG BUILD_TAG
# GO_VERSION and BUILD_TAG are expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
ARG BUILD_TAG=latest
FROM golang:${GO_VERSION} AS antrea-build

WORKDIR /antrea
Expand Down
5 changes: 3 additions & 2 deletions build/images/Dockerfile.build.agent.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
ARG BUILD_TAG
# GO_VERSION and BUILD_TAG are expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
ARG BUILD_TAG=latest
FROM golang:${GO_VERSION} AS antrea-build

WORKDIR /antrea
Expand Down
4 changes: 2 additions & 2 deletions build/images/Dockerfile.build.controller.coverage
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
ARG BUILD_TAG
# GO_VERSION is expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
FROM golang:${GO_VERSION} AS antrea-build

WORKDIR /antrea
Expand Down
4 changes: 2 additions & 2 deletions build/images/Dockerfile.build.controller.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
ARG BUILD_TAG
# GO_VERSION is expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
FROM golang:${GO_VERSION} AS antrea-build

WORKDIR /antrea
Expand Down
4 changes: 2 additions & 2 deletions build/images/Dockerfile.build.controller.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
ARG BUILD_TAG
# GO_VERSION is expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
FROM golang:${GO_VERSION} AS antrea-build

WORKDIR /antrea
Expand Down
2 changes: 1 addition & 1 deletion build/images/Dockerfile.build.migrator
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ USER root

COPY build/images/scripts/migrate_cni /usr/local/bin/

ENV CRICTL_VERSION="v1.27.0"
ENV CRICTL_VERSION="v1.31.1"
RUN apt update \
&& apt install -y jq ca-certificates wget \
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/* \
Expand Down
5 changes: 3 additions & 2 deletions build/images/Dockerfile.build.windows
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
ARG OVS_VERSION
# GO_VERSION and OVS_VERSION are expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
ARG OVS_VERSION=3.0.5

FROM --platform=linux/amd64 golang:${GO_VERSION} AS antrea-build-windows
ARG CNI_BINARIES_VERSION
Expand Down
3 changes: 2 additions & 1 deletion build/images/Dockerfile.simulator.build.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
# GO_VERSION is expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
FROM golang:${GO_VERSION} AS antrea-build

WORKDIR /antrea
Expand Down
3 changes: 2 additions & 1 deletion build/images/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG BUILD_TAG
# BUILD_TAG is expected to be overridden by CI build scripts
ARG BUILD_TAG=latest
FROM ubuntu:24.04 AS cni-binaries

ARG CNI_BINARIES_VERSION
Expand Down
3 changes: 2 additions & 1 deletion build/images/base/Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG BUILD_TAG
# BUILD_TAG is expected to be overridden by CI build scripts
ARG BUILD_TAG=latest
FROM ubuntu:24.04 AS cni-binaries

ARG CNI_BINARIES_VERSION
Expand Down
3 changes: 2 additions & 1 deletion build/images/codegen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
# GO_VERSION is expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
FROM ubuntu:24.04 AS protoc

RUN apt-get update && \
Expand Down
3 changes: 2 additions & 1 deletion build/images/flow-aggregator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
# GO_VERSION is expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
FROM golang:${GO_VERSION} AS flow-aggregator-build

WORKDIR /antrea
Expand Down
3 changes: 2 additions & 1 deletion build/images/flow-aggregator/Dockerfile.coverage
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
# GO_VERSION is expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
FROM golang:${GO_VERSION} AS flow-aggregator-build

WORKDIR /antrea
Expand Down
3 changes: 2 additions & 1 deletion build/images/ovs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ FROM ubuntu:24.04 AS ovs-debs

# Some patches may not apply cleanly if a non-default version is provided.
# See build/images/deps/ovs-version for the default version.
ARG OVS_VERSION
# OVS_VERSION is expected to be overridden by CI build scripts.
ARG OVS_VERSION=2.17.7

# Install dependencies for building OVS deb packages
# We only install python3 packages and we only support building OVS >= 2.13.0.
Expand Down
6 changes: 4 additions & 2 deletions build/images/ovs/Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
FROM quay.io/centos/centos:stream9 AS ovs-rpms
# Some patches may not apply cleanly if a non-default version is provided.
# See build/images/deps/ovs-version for the default version.
ARG OVS_VERSION
# OVS_VERSION is expected to be overridden by CI build scripts.
ARG OVS_VERSION=2.17.7

# Install RPM tools and generic build dependencies.
RUN yum clean all -y && yum -y install wget git yum-utils python3 rpm-build && \
Expand All @@ -40,7 +41,8 @@ RUN cd /tmp/openvswitch* && \
rm -rf /tmp/openvswitch*

FROM registry.access.redhat.com/ubi9
ARG OVS_VERSION
# OVS_VERSION is expected to be overridden by CI build scripts.
ARG OVS_VERSION=2.17.7

LABEL maintainer="Antrea <[email protected]>"
LABEL description="A Docker image based on UBI9 which includes Open vSwitch built from source."
Expand Down
3 changes: 2 additions & 1 deletion build/images/ovs/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
# limitations under the License.

FROM --platform=linux/amd64 ubuntu:24.04 AS antrea-windows-builder
ARG OVS_VERSION
# OVS_VERSION is expected to be overridden by CI build scripts
ARG OVS_VERSION=3.0.5

RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends unzip
Expand Down
6 changes: 4 additions & 2 deletions build/images/test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG BUILD_TAG
# BUILD_TAG is expected to be overridden by CI build scripts
ARG BUILD_TAG=latest
FROM antrea/openvswitch:${BUILD_TAG}

LABEL maintainer="Antrea <[email protected]>"
Expand All @@ -22,7 +23,8 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends iproute2 iptables ipset jq make wget gcc libc6-dev ca-certificates git && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/*

ARG GO_VERSION
# GO_VERSION is expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
ENV GOPATH /go

RUN GO_ARCHIVE=$(wget -q -O - "https://go.dev/dl/?mode=json&include=all" | jq --arg version_prefix "go${GO_VERSION}." -r '. | map(select(. | .version | startswith($version_prefix))) | first | .files[] | select(.os == "linux" and .arch == "amd64" and .kind == "archive").filename') && \
Expand Down
3 changes: 2 additions & 1 deletion multicluster/build/images/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
# GO_VERSION is expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
FROM golang:${GO_VERSION} AS antrea-build

WORKDIR /antrea
Expand Down
3 changes: 2 additions & 1 deletion multicluster/build/images/Dockerfile.build.coverage
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION
# GO_VERSION is expected to be overridden by CI build scripts
ARG GO_VERSION=1.23
FROM golang:${GO_VERSION} AS antrea-build

WORKDIR /antrea
Expand Down

0 comments on commit 8531d9d

Please sign in to comment.