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

clustermesh: add hostname endpointslice sync #31814

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

MrFreezeex
Copy link
Member

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Please add yourself to the Users doc
  • Thanks for contributing!

This adds hostname synchronization in EndpointSlice. This PR adds the Hostname field in the slims kubernetes struct and propagate that up to the clustermesh's ClusterService struct.

 Add clustermesh hostname endpointslice synchronization

@MrFreezeex MrFreezeex requested review from a team as code owners April 7, 2024 15:05
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Apr 7, 2024
@MrFreezeex MrFreezeex force-pushed the sync-hostname branch 3 times, most recently from 4742dca to c6ab182 Compare April 7, 2024 15:22
@MrFreezeex
Copy link
Member Author

/test

@MrFreezeex
Copy link
Member Author

/test

Copy link
Member

@YutaroHayakawa YutaroHayakawa left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! Could you elaborate more about the problem this PR tries to solve or use case you want to realize?

@MrFreezeex
Copy link
Member Author

MrFreezeex commented Apr 8, 2024

Thanks for your contribution! Could you elaborate more about the problem this PR tries to solve or use case you want to realize?

Sure! So this is linked to the new EndpointSlice sync mechanism that was recently merged (https://github.com/cilium/cilium/pull/28440). And this PR aim to resolve one of the limitation of endpointslice sync about not being able to sync the "hostname" field in an EndpointSlice. For instance, the hostname field is used by StatefulSets to resolve with DNS using ${podName}.${svcName} (instead of just ${svcName}).

Hope this helps!

Copy link
Contributor

@lambdanis lambdanis left a comment

Choose a reason for hiding this comment

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

I left a few docs style suggestions, but the docs structure good.

Documentation/network/clustermesh/services.rst Outdated Show resolved Hide resolved
Documentation/network/clustermesh/services.rst Outdated Show resolved Hide resolved
Documentation/network/clustermesh/services.rst Outdated Show resolved Hide resolved
@lambdanis lambdanis added the release-note/minor This PR changes functionality that users may find relevant to operating Cilium. label Apr 9, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Apr 9, 2024
@lambdanis lambdanis added the area/clustermesh Relates to multi-cluster routing functionality in Cilium. label Apr 9, 2024
Copy link
Member

@YutaroHayakawa YutaroHayakawa left a comment

Choose a reason for hiding this comment

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

LGTM with a nit.

pkg/clustermesh/endpointslicesync/endpointslice_test.go Outdated Show resolved Hide resolved
@MrFreezeex MrFreezeex force-pushed the sync-hostname branch 2 times, most recently from 9ba92be to 095f4b2 Compare April 10, 2024 08:39
@MrFreezeex
Copy link
Member Author

/test

pkg/k8s/endpoints.go Show resolved Hide resolved
@MrFreezeex MrFreezeex force-pushed the sync-hostname branch 2 times, most recently from 15d63d9 to ab6290b Compare April 19, 2024 11:38
@MrFreezeex MrFreezeex requested a review from joamaki April 22, 2024 08:45
@joamaki
Copy link
Contributor

joamaki commented Apr 24, 2024

/test

@MrFreezeex MrFreezeex force-pushed the sync-hostname branch 2 times, most recently from 29b113f to f22b241 Compare April 24, 2024 09:40
@MrFreezeex
Copy link
Member Author

MrFreezeex commented Apr 24, 2024

(I rebased and run generate-k8s-api again to fix the conflict on pkg/k8s/slim/k8s/api/core/v1/generated.pb.go no code change)

@MrFreezeex
Copy link
Member Author

/test

This adds hostname synchronization in EndpointSlice. This commit adds
the Hostname field in the slims kubernetes struct and propagate that up
to the clustermesh's ClusterService struct.

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
@MrFreezeex
Copy link
Member Author

/test

@MrFreezeex
Copy link
Member Author

/ci-ingress

@MrFreezeex
Copy link
Member Author

/ci-l4lb

@MrFreezeex
Copy link
Member Author

/ci-ipsec-upgrade

@MrFreezeex
Copy link
Member Author

/ci-ingress

1 similar comment
@MrFreezeex
Copy link
Member Author

/ci-ingress

@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 Apr 24, 2024
@ti-mo ti-mo added this pull request to the merge queue Apr 25, 2024
Merged via the queue into cilium:main with commit 4a8492f Apr 25, 2024
62 of 64 checks passed
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. 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