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

Merge clustermesh-apiserver and kvstoremesh into a single image #27888

Merged
merged 5 commits into from
Nov 3, 2023

Conversation

giorio94
Copy link
Member

@giorio94 giorio94 commented Sep 1, 2023

Reporting here the message from the main commit for convenience:

Merge the kvstoremesh logic into the clustermesh-apiserver as a separate
subcommand, so that we can get rid of one image and reduce the overall
time to bootstrap the clustermesh-apiserver deployment. The additional
boilerplate to build the kvstoremesh images is dropped.

Size of the images before this change:
$ make docker-clustermesh-apiserver-image
$ docker inspect -f '{{ .Size }}' quay.io/cilium/clustermesh-apiserver:latest | \
         numfmt --to=si --suffix=B --format="%.2f"
---> 72.09MB
$ make docker-kvstoremesh-image
$ docker inspect -f '{{ .Size }}' quay.io/cilium/kvstoremesh:latest | \
         numfmt --to=si --suffix=B --format="%.2f"
---> 64.62MB

Size of the image after this change:
$ make docker-clustermesh-apiserver-image
$ docker inspect -f '{{ .Size }}' quay.io/cilium/clustermesh-apiserver:latest | \
         numfmt --to=si --suffix=B --format="%.2f"
---> 72.26MB

Depends on #27823, #27817, #27873

To be discussed in the next community meeting: should we rename the clustermesh-apiserver pod/image to something more expressive which better highlights the new structure (the container is planned to be extended to include the etcd binary, as well as the current init-container logic)? This would require a fairly large amount of CI changes (some of which will likely only pop-up during the next release), as well as make backporting of CI changes more tricky in the future.

Merge clustermesh-apiserver and kvstoremesh into a single image

@giorio94 giorio94 added kind/cleanup This includes no functional changes. release-note/minor This PR changes functionality that users may find relevant to operating Cilium. area/clustermesh Relates to multi-cluster routing functionality in Cilium. labels Sep 1, 2023
@giorio94 giorio94 force-pushed the pr/giorio94/main/clustermesh-apiserver-single-image branch 2 times, most recently from 85fb27e to 06b5660 Compare September 1, 2023 15:43
@giorio94
Copy link
Member Author

giorio94 commented Sep 1, 2023

/test

@giorio94
Copy link
Member Author

giorio94 commented Sep 1, 2023

/test

@giorio94 giorio94 force-pushed the pr/giorio94/main/clustermesh-apiserver-single-image branch from d9c7859 to 578c890 Compare September 19, 2023 07:37
@giorio94
Copy link
Member Author

/test

@giorio94 giorio94 force-pushed the pr/giorio94/main/clustermesh-apiserver-single-image branch from 578c890 to 1578a26 Compare September 19, 2023 07:57
@giorio94
Copy link
Member Author

/test

@giorio94
Copy link
Member Author

Conformance Cluster Mesh hit #27672

@giorio94
Copy link
Member Author

/test

@giorio94 giorio94 marked this pull request as ready for review September 25, 2023 15:23
@giorio94 giorio94 requested review from a team as code owners September 25, 2023 15:23
@giorio94
Copy link
Member Author

Converting back to draft. I'm going to split this PR into multiple ones to reduce the size.

@giorio94 giorio94 marked this pull request as draft October 10, 2023 07:53
Refactor the clustermesh-apiserver to mimic the structure adopted by the
agent, as a preparation to merge it with kvstoremesh in a single binary.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Move the current clustermesh-apiserver code to a dedicated subcommand,
to prepare for the subsequent merging of kvstoremesh into the same binary.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Refactor kvstoremesh to mimic the structure adopted by the agent, as a
preparation to merge it with the clustermesh-apiserver in a single binary.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@giorio94 giorio94 force-pushed the pr/giorio94/main/clustermesh-apiserver-single-image branch from 7cb8327 to 3f163d0 Compare October 23, 2023 09:44
@giorio94
Copy link
Member Author

/test

@giorio94
Copy link
Member Author

A couple of preliminary commits have been extracted into their own PRs to reduce the size of this one, and have been merged. I've rebased this PR onto main, before marking it ready for review again. Now, it only shuffles things around, and performs the necessary adaptations.

In the end, I've preserved the clustermesh-apiserver image name. The reason being that changing it would be a quite significant effort to adapt the CI, renovate configs and alike, but bringing little value, as the clustermesh-apiserver name would still used in all user-facing resources. And changing it also for the user-facing ones would be complex in terms of backward compatibility (especially concerning helm settings), and could end up bringing more confusion than clarity (as users currently recognize the clustermesh-apiserver as the control plane for clustermesh). Happy to reconsider if anyone has strong opinions against the current approach though.

@giorio94 giorio94 marked this pull request as ready for review October 23, 2023 12:07
@giorio94 giorio94 requested a review from a team as a code owner October 23, 2023 12:07
@giorio94 giorio94 requested a review from asauber October 23, 2023 12:07
Merge the kvstoremesh logic into the clustermesh-apiserver as a separate
subcommand, so that we can get rid of one image and reduce the overall
time to bootstrap the clustermesh-apiserver deployment. The additional
boilerplate to build the kvstoremesh images is dropped, except for the
Dockerfile, which is currently preserved to prevent CI failures (and
will be removed through a subsequent commit).

Size of the images before this change:
$ make docker-clustermesh-apiserver-image
$ docker inspect -f '{{ .Size }}' quay.io/cilium/clustermesh-apiserver:latest | \
         numfmt --to=si --suffix=B --format="%.2f"
---> 72.09MB
$ make docker-kvstoremesh-image
$ docker inspect -f '{{ .Size }}' quay.io/cilium/kvstoremesh:latest | \
         numfmt --to=si --suffix=B --format="%.2f"
---> 64.62MB

Size of the image after this change:
$ make docker-clustermesh-apiserver-image
$ docker inspect -f '{{ .Size }}' quay.io/cilium/clustermesh-apiserver:latest | \
         numfmt --to=si --suffix=B --format="%.2f"
---> 72.26MB

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Align the clustermesh-apiserver Makefile with the strategy already
adopted in the ones for the other components, so that it can be
included from elsewhere.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@giorio94 giorio94 force-pushed the pr/giorio94/main/clustermesh-apiserver-single-image branch from 3f163d0 to fd489bd Compare October 23, 2023 12:14
@giorio94
Copy link
Member Author

/test

Copy link
Member

@asauber asauber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLI-related changes look good

Copy link
Contributor

@viktor-kurchenko viktor-kurchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@aditighag aditighag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for the CODEOWNERS file changes.

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 1, 2023
@aanm aanm merged commit 3b9ea60 into main Nov 3, 2023
214 checks passed
@aanm aanm deleted the pr/giorio94/main/clustermesh-apiserver-single-image branch November 3, 2023 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clustermesh Relates to multi-cluster routing functionality in Cilium. kind/cleanup This includes no functional changes. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants