-
Notifications
You must be signed in to change notification settings - Fork 366
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
Change flow-aggregator base images to reduce image size #2004
Change flow-aggregator base images to reduce image size #2004
Conversation
Found |
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 cannot use alpine as a base image for VMware originated open-source software. We should fix the netpol image as well but at least it is only used for testing.
I suggested using distroless in the issue. Please use scratch
since we are only including a static Go binary.
c9023a8
to
732262f
Compare
kk, fixed. |
Codecov Report
@@ Coverage Diff @@
## main #2004 +/- ##
==========================================
+ Coverage 65.14% 65.34% +0.20%
==========================================
Files 197 197
Lines 17407 17407
==========================================
+ Hits 11340 11375 +35
+ Misses 4880 4858 -22
+ Partials 1187 1174 -13
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
LGTM, thanks for the PR. If you feel like opening a second one, feel free to fix the netpol base image :)
732262f
to
4333de5
Compare
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.
LGTM.
I see that netpol image is also being changed. It would be good to change PR title and description.
@@ -7,7 +7,7 @@ COPY . /antrea | |||
|
|||
RUN make flow-aggregator | |||
|
|||
FROM antrea/base-ubuntu:${OVS_VERSION} | |||
FROM scratch |
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.
/cc @dreamtalen @zyiou who contributes to Flow Aggregator feature.
hack/netpol/Dockerfile
Outdated
@@ -4,6 +4,6 @@ ADD ./ /netpol | |||
WORKDIR /netpol | |||
RUN go build -o main pkg/main/main.go | |||
|
|||
FROM alpine | |||
FROM scratch |
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 suggested doing this in a separate PR
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 see, will revert that change, thx!
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.
Done, will put the change for netpol
image in another PR.
4333de5
to
74b8b6c
Compare
/test-e2e |
|
Fix the error of Flow Aggregator image after PR antrea-io#2004 changed the base image to scratch. Change the image name target "flow-aggregator-ubuntu" to "flow-aggregtor-image" in Makefile since ubuntu is not relevant. Change the base image of Flow Aggregator code coverage image to ubuntu:20.04.
Fix the error of Flow Aggregator image after PR antrea-io#2004 changed the base image to scratch. Change the image name target "flow-aggregator-ubuntu" to "flow-aggregtor-image" in Makefile since ubuntu is not relevant. Change the base image of Flow Aggregator code coverage image to ubuntu:20.04.
Fix the error of Flow Aggregator image after PR antrea-io#2004 changed the base image to scratch. Change the image name target "flow-aggregator-ubuntu" to "flow-aggregtor-image" in Makefile since ubuntu is not relevant. Change the base image of Flow Aggregator code coverage image to ubuntu:20.04.
Fix the error of Flow Aggregator image after PR antrea-io#2004 changed the base image to scratch. Change the image name target "flow-aggregator-ubuntu" to "flow-aggregtor-image" in Makefile since ubuntu is not relevant. Change the base image of Flow Aggregator code coverage image to ubuntu:20.04.
Fix the error of Flow Aggregator image after PR antrea-io#2004 changed the base image to scratch. Change the image name target "flow-aggregator-ubuntu" to "flow-aggregtor-image" in Makefile since ubuntu is not relevant. Change the base image of Flow Aggregator code coverage image to ubuntu:20.04.
Flow aggregator only needs the Golang binary and doesn't have dependencies on OVS. Changing the base image to reduce image size.
Closes #1986.