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

Use different images for antrea-controller and antrea-agent #5691

Closed
wenyingd opened this issue Nov 10, 2023 · 5 comments
Closed

Use different images for antrea-controller and antrea-agent #5691

wenyingd opened this issue Nov 10, 2023 · 5 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@wenyingd
Copy link
Contributor

Describe the bug

In the existing manifest, antrea-agent and antrea-controller are sharing the same image. Focusing on antrea-controller itself, many packages required by antrea-agent is not needed. The current solution leads to a larger size of the final antrea image (e.g, antrea/antrea-ubuntu) antrea-controller, which causes a longer time is cost when starting antrea-controller container. In some setups, it may cause almost 2m to download the image.

As antrea-agent has a toleration of 70s on antrea-controller is unvailable. In upgrade scenario, the longer time spent on image downloading finally causes a lot of antrea-agent Pods come to "notReady" status, then it would break the rolling update stragety.

So it would be better if we can reduce the image size of antrea-controller, e.g. use a smaller basic image, remove unneeded packages..

To Reproduce

Expected

Actual behavior

Versions:

Additional context

@wenyingd wenyingd added the kind/bug Categorizes issue or PR as related to a bug. label Nov 10, 2023
@tnqn
Copy link
Member

tnqn commented Nov 10, 2023

I am inclined to agree with Wenying. Not only the unnecessary antrea-agent, antea-cni binaries, but also the whole OVS, iptables, suricata dependecies can be got rid of from antrea-controller image. I reckon the final image for antrea-controller could be reduced about 400+MB. It could also save around 90MB (antrea-controller) on non control-plane Nodes.

cc @jianjuns @antoninbas @salv-orlando

@antoninbas
Copy link
Contributor

No objections from me. I also have been thinking about whether we should do this for a while.

@antoninbas
Copy link
Contributor

I suggest that at first we keep the antrea/antrea-ubuntu image as is, to avoid possible disruptions for user that may consume this image directly.
We can introduce 2 new images, one specific to the agent and one specific to the controller.
We can stop publishing the unified image for Antrea v2.

@antoninbas
Copy link
Contributor

@rajnkamr @jainpulkit22 this should be doable for the v1.15 release, right?

@rajnkamr
Copy link
Contributor

@antoninbas , We might bring it in v1.15 based on ETA

jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Dec 13, 2023
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
@rajnkamr rajnkamr added this to the Antrea v1.15 release milestone Dec 14, 2023
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 3, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 3, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 3, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 3, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 4, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 4, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 4, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 4, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 4, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 4, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 4, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 4, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 5, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 5, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 5, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 8, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 8, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 8, 2024
Fixes antrea-io#5691.

Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 8, 2024
Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Fixes antrea-io#5691.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 9, 2024
Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Fixes antrea-io#5691.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 9, 2024
Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Fixes antrea-io#5691.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 9, 2024
Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Fixes antrea-io#5691.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 10, 2024
Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Fixes antrea-io#5691.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
jainpulkit22 pushed a commit to jainpulkit22/antrea that referenced this issue Jan 10, 2024
Modified the code to build separate images for antrea-agent and
antrea-controller, because there are many resources that are not
required by controller and are required by agent only, and unified
image for both creates a burden when starting antrea-controller and
thus it takes time to start. For this reason I have create separate
images for antrea-agent and antrea-controller.

Fixes antrea-io#5691.

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
antoninbas added a commit that referenced this issue Jan 23, 2024
This helps reduce image sizes, leading to a better user experience
when installing Antrea.

For #5691 

---------

Signed-off-by: Pulkit Jain <jainpu@vmware.com>
Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Co-authored-by: Antonin Bas <antonin.bas@broadcom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants