-
Notifications
You must be signed in to change notification settings - Fork 364
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
Support antrea-agent UBI8 based image #3273
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
ARG GO_VERSION | ||
ARG OVS_VERSION | ||
FROM golang:${GO_VERSION} as antrea-build | ||
|
||
WORKDIR /antrea | ||
|
||
COPY go.mod /antrea/go.mod | ||
|
||
RUN go mod download | ||
|
||
COPY . /antrea | ||
|
||
RUN make antrea-agent antrea-controller antrea-cni antctl-linux | ||
RUN mv bin/antctl-linux bin/antctl | ||
|
||
FROM antrea/base-ubi:${OVS_VERSION} | ||
|
||
LABEL maintainer="Antrea <[email protected]>" | ||
LABEL description="The Docker image to deploy the Antrea CNI. " | ||
|
||
USER root | ||
|
||
COPY build/images/scripts/* /usr/local/bin/ | ||
COPY --from=antrea-build /antrea/bin/* /usr/local/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ RUN set -eux; \ | |
FROM antrea/openvswitch:${OVS_VERSION} | ||
|
||
LABEL maintainer="Antrea <[email protected]>" | ||
LABEL description="Takes care of building the Antrea binaries as part of building the image." | ||
LABEL description="An Ubuntu based Docker base image for Antrea." | ||
|
||
USER root | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
ARG OVS_VERSION | ||
FROM ubuntu:20.04 as cni-binaries | ||
|
||
ARG CNI_BINARIES_VERSION | ||
ARG WHEREABOUTS_VERSION=v0.4.2 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends wget ca-certificates | ||
|
||
# Leading dot is required for the tar command below | ||
ENV CNI_PLUGINS="./host-local ./loopback ./portmap ./bandwidth" | ||
|
||
# Download containernetworking plugin binaries for the correct architecture | ||
RUN set -eux; \ | ||
dpkgArch="$(dpkg --print-architecture)"; \ | ||
case "${dpkgArch##*-}" in \ | ||
amd64) pluginsArch='amd64' ;; \ | ||
armhf) pluginsArch='arm' ;; \ | ||
arm64) pluginsArch='arm64' ;; \ | ||
*) pluginsArch=''; echo >&2; echo >&2 "unsupported architecture '$dpkgArch'"; echo >&2 ; exit 1 ;; \ | ||
esac; \ | ||
mkdir -p /opt/cni/bin; \ | ||
wget -q -O - https://github.com/containernetworking/plugins/releases/download/$CNI_BINARIES_VERSION/cni-plugins-linux-${pluginsArch}-$CNI_BINARIES_VERSION.tgz | tar xz -C /opt/cni/bin $CNI_PLUGINS; \ | ||
wget -q -O - https://downloads.antrea.io/whereabouts/$WHEREABOUTS_VERSION/whereabouts-linux-${pluginsArch}.tgz | tar xz -C /opt/cni/bin/ whereabouts-linux-${pluginsArch}/whereabouts --strip-components=1 --no-same-owner | ||
|
||
FROM antrea/openvswitch-ubi:${OVS_VERSION} | ||
|
||
LABEL maintainer="Antrea <[email protected]>" | ||
LABEL description="An UBI8 based Docker base image for Antrea." | ||
|
||
USER root | ||
|
||
RUN yum install ipset jq -y && yum clean all | ||
|
||
COPY --from=cni-binaries /opt/cni/bin /opt/cni/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[AppStream] | ||
name=CentOS-8-stream - AppStream | ||
mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=$basearch&repo=AppStream&infra=$infra | ||
#baseurl=http://mirror.centos.org/$contentdir/8-stream/AppStream/$basearch/os/ | ||
gpgcheck=1 | ||
enabled=1 | ||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial | ||
|
||
[BaseOS] | ||
name=CentOS-8-stream - Base | ||
mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=$basearch&repo=BaseOS&infra=$infra | ||
#baseurl=http://mirror.centos.org/$contentdir/8-stream/BaseOS/$basearch/os/ | ||
gpgcheck=1 | ||
enabled=1 | ||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial | ||
|
||
[extras] | ||
name=CentOS-8-stream - Extras | ||
mirrorlist=http://mirrorlist.centos.org/?release=8-stream&arch=$basearch&repo=extras&infra=$infra | ||
#baseurl=http://mirror.centos.org/$contentdir/8-stream/extras/$basearch/os/ | ||
gpgcheck=1 | ||
enabled=1 | ||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We recently started installing
iptables-wrapper
in the ubuntu base image to improve portability on different Node operating systems: #3276. You probably want to do the same here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like there's a support issue with RHEL:
RHEL/CentOS 7 ship iptables 1.4, which does not support nft mode. RHEL/CentOS 8 ship a hacked version of iptables 1.8 that only supports nft mode. Therefore, neither can be used as a basis for a portable iptables-using container image.
https://github.com/kubernetes-sigs/iptables-wrappers/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this also applies to CentOS 8 stream?
It should not really matter anyway if the expectation is that the Nodes will also run CentOS 8 and support nft mode.