Skip to content

Commit

Permalink
Merge branch 'main' into antrea-connectivity-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kanha-gupta committed Mar 22, 2024
2 parents 2ef9eaa + df82b76 commit 8d93f94
Show file tree
Hide file tree
Showing 250 changed files with 4,963 additions and 5,263 deletions.
131 changes: 0 additions & 131 deletions build/charts/antrea/crds/clustergroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,131 +4,9 @@ metadata:
name: clustergroups.crd.antrea.io
labels:
app: antrea
served-by: antrea-controller
spec:
group: crd.antrea.io
versions:
- name: v1alpha2
served: true
storage: false
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
childGroups:
type: array
items:
type: string
podSelector:
type: object
properties:
matchExpressions:
type: array
items:
type: object
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
type: array
items:
type: string
pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
matchLabels:
x-kubernetes-preserve-unknown-fields: true
namespaceSelector:
type: object
properties:
matchExpressions:
type: array
items:
type: object
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
type: array
items:
type: string
pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
matchLabels:
x-kubernetes-preserve-unknown-fields: true
externalEntitySelector:
type: object
properties:
matchExpressions:
type: array
items:
type: object
properties:
key:
type: string
operator:
enum:
- In
- NotIn
- Exists
- DoesNotExist
type: string
values:
type: array
items:
type: string
pattern: "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$"
matchLabels:
x-kubernetes-preserve-unknown-fields: true
ipBlock:
type: object
properties:
cidr:
type: string
format: cidr
ipBlocks:
type: array
items:
type: object
properties:
cidr:
type: string
format: cidr
serviceReference:
type: object
properties:
name:
type: string
namespace:
type: string
status:
type: object
properties:
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
lastTransitionTime:
type: string
- name: v1alpha3
served: true
storage: false
Expand Down Expand Up @@ -372,15 +250,6 @@ spec:
type: string
subresources:
status: { }
conversion:
strategy: Webhook
webhook:
conversionReviewVersions: ["v1", "v1beta1"]
clientConfig:
service:
name: "antrea"
namespace: "kube-system"
path: "/convert/clustergroup"
scope: Cluster
names:
plural: clustergroups
Expand Down
16 changes: 14 additions & 2 deletions build/charts/antrea/crds/clusternetworkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1076,11 +1076,17 @@ spec:
type: object
namespaces:
type: object
maxProperties: 1
minProperties: 1
properties:
match:
type: string
enum:
- Self
type: string
sameLabels:
type: array
items:
type: string
ipBlock:
type: object
properties:
Expand Down Expand Up @@ -1352,11 +1358,17 @@ spec:
type: object
namespaces:
type: object
maxProperties: 1
minProperties: 1
properties:
match:
type: string
enum:
- Self
type: string
sameLabels:
type: array
items:
type: string
ipBlock:
type: object
properties:
Expand Down
25 changes: 2 additions & 23 deletions build/images/Dockerfile.build.agent.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG BUILD_TAG
FROM registry.access.redhat.com/ubi8 as antrea-build

ADD https://go.dev/dl/?mode=json&include=all go-versions.json

RUN yum install ca-certificates gcc git jq make wget -y

ARG GO_VERSION

# GO_VERSION is a Go minor version, we use the downloaded go-versions.json file
# to identify and install the latest patch release for this minor version.
RUN set -eux; \
arch="$(uname -m)"; \
case "${arch##*-}" in \
x86_64) goArch='amd64' ;; \
arm) goArch='armv6l' ;; \
aarch64) goArch='arm64' ;; \
*) goArch=''; echo >&2; echo >&2 "unsupported architecture '$arch'"; echo >&2 ; exit 1 ;; \
esac; \
GO_ARCHIVE=$(jq --arg version_prefix "go${GO_VERSION}." --arg arch "$goArch" -r '. | map(select(. | .version | startswith($version_prefix))) | first | .files[] | select(.os == "linux" and .arch == $arch and .kind == "archive").filename' go-versions.json); \
wget -q -O - https://go.dev/dl/${GO_ARCHIVE} | tar xz -C /usr/local/

# Using ENV makes the change persistent, but this is just a builder image.
ENV PATH /usr/local/go/bin:$PATH
ARG BUILD_TAG
FROM golang:${GO_VERSION} as antrea-build

WORKDIR /antrea

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

ARG BUILD_TAG
FROM registry.access.redhat.com/ubi8 as antrea-build

ADD https://go.dev/dl/?mode=json&include=all go-versions.json

RUN yum install ca-certificates gcc git jq make wget -y

ARG GO_VERSION

# GO_VERSION is a Go minor version, we use the downloaded go-versions.json file
# to identify and install the latest patch release for this minor version.
RUN set -eux; \
arch="$(uname -m)"; \
case "${arch##*-}" in \
x86_64) goArch='amd64' ;; \
arm) goArch='armv6l' ;; \
aarch64) goArch='arm64' ;; \
*) goArch=''; echo >&2; echo >&2 "unsupported architecture '$arch'"; echo >&2 ; exit 1 ;; \
esac; \
GO_ARCHIVE=$(jq --arg version_prefix "go${GO_VERSION}." --arg arch "$goArch" -r '. | map(select(. | .version | startswith($version_prefix))) | first | .files[] | select(.os == "linux" and .arch == $arch and .kind == "archive").filename' go-versions.json); \
wget -q -O - https://go.dev/dl/${GO_ARCHIVE} | tar xz -C /usr/local/

# Using ENV makes the change persistent, but this is just a builder image.
ENV PATH /usr/local/go/bin:$PATH
ARG BUILD_TAG
FROM golang:${GO_VERSION} as antrea-build

WORKDIR /antrea

Expand Down
9 changes: 5 additions & 4 deletions build/images/codegen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM ubuntu:22.04 as protoc
RUN apt-get update && \
apt-get install -y --no-install-recommends wget ca-certificates unzip

RUN PROTOBUF_VERSION=3.0.2; ZIPNAME="protoc-${PROTOBUF_VERSION}-linux-x86_64.zip"; \
RUN PROTOBUF_VERSION=26.0; ZIPNAME="protoc-${PROTOBUF_VERSION}-linux-x86_64.zip"; \
mkdir /tmp/protoc && cd /tmp/protoc && \
wget "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/${ZIPNAME}" && \
unzip "${ZIPNAME}" && \
Expand All @@ -32,11 +32,11 @@ LABEL description="A Docker image based on the golang image, which includes code

ENV GO111MODULE=on

ARG K8S_VERSION=1.26.4
ARG K8S_VERSION=1.29.2
# The k8s.io/kube-openapi repo does not have tag, using a workable commit hash.
# We use the version that is referenced in the Kubernetes go.mod (for the
# correct K8s version).
ARG KUBEOPENAPI_VERSION=v0.0.0-20221012153701-172d655c2280
ARG KUBEOPENAPI_VERSION=v0.0.0-20231010175941-2dd684a91f00

RUN go install k8s.io/code-generator/cmd/client-gen@kubernetes-$K8S_VERSION && \
go install k8s.io/code-generator/cmd/deepcopy-gen@kubernetes-$K8S_VERSION && \
Expand All @@ -47,7 +47,8 @@ RUN go install k8s.io/code-generator/cmd/client-gen@kubernetes-$K8S_VERSION && \
go install k8s.io/code-generator/cmd/go-to-protobuf@kubernetes-$K8S_VERSION && \
go install k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo@kubernetes-$K8S_VERSION && \
go install go.uber.org/mock/[email protected] && \
go install github.com/golang/protobuf/[email protected] && \
go install google.golang.org/protobuf/cmd/[email protected] && \
go install google.golang.org/grpc/cmd/[email protected] && \
go install golang.org/x/tools/cmd/goimports@latest && \
go install sigs.k8s.io/controller-tools/cmd/[email protected]

Expand Down
4 changes: 4 additions & 0 deletions build/images/codegen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ docker push antrea/codegen:<TAG>
The `docker push` command will fail if you do not have permission to push to the
`antrea` Dockerhub repository.

The image can only be built on an x86_64 machine (no arm support).

Here is the table of codegen images that have been uploaded:

| Tag | Change |
| :----------------------------- | ---------------------------------------------------- |
| kubernetes-1.29.2-build.0 | Upgraded protoc (v26.0), protoc-gen-go (v1.33.0), protoc-gen-go-grpc (v1.3.0) |
| kubernetes-1.29.2 | Upgraded K8s libraries to v1.29.2 |
| kubernetes-1.26.4-build.1 | Replace github.com/golang/mock with go.uber.org/mock |
| kubernetes-1.26.4-build.0 | Upgraded Go to v1.21 |
| kubernetes-1.26.4 | Upgraded K8s libraries to v1.26.4 |
Expand Down
Loading

0 comments on commit 8d93f94

Please sign in to comment.