Skip to content

clustermesh: remove hostAliases and replace it by a custom dialer#44425

Merged
MrFreezeex merged 4 commits intomainfrom
pr/mrfreezeex/hostaliases-removal
Mar 2, 2026
Merged

clustermesh: remove hostAliases and replace it by a custom dialer#44425
MrFreezeex merged 4 commits intomainfrom
pr/mrfreezeex/hostaliases-removal

Conversation

@MrFreezeex
Copy link
Copy Markdown
Member

@MrFreezeex MrFreezeex commented Feb 18, 2026

See each commit

Fixes #42716

clustermesh: remove components restart when providing directly IP (no domain) to connect to remote clustermesh-apiserver

@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 Feb 18, 2026
@MrFreezeex
Copy link
Copy Markdown
Member Author

/test

@MrFreezeex MrFreezeex force-pushed the pr/mrfreezeex/hostaliases-removal branch from 2c316ea to 9f6f6ca Compare February 18, 2026 15:40
@MrFreezeex
Copy link
Copy Markdown
Member Author

/test

1 similar comment
@MrFreezeex
Copy link
Copy Markdown
Member Author

/test

@MrFreezeex MrFreezeex changed the title [CI TEST] clustermesh: ci: add MCS-API conformance test clustermesh: remove hostAliases and replace it by a custom Feb 18, 2026
@MrFreezeex MrFreezeex added 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. and removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Feb 18, 2026
@MrFreezeex MrFreezeex changed the title clustermesh: remove hostAliases and replace it by a custom clustermesh: remove hostAliases and replace it by a custom dialer Feb 18, 2026
@MrFreezeex MrFreezeex marked this pull request as ready for review February 18, 2026 16:46
@MrFreezeex MrFreezeex requested review from a team as code owners February 18, 2026 16:46
@MrFreezeex
Copy link
Copy Markdown
Member Author

MrFreezeex commented Feb 18, 2026

This PR is the continuation from this PR to test the small workflow change in a cilium/cilium branch instead of a fork: #43767 (sorry again to the existing reviewers :/).

Copy link
Copy Markdown
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

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

Thanks! Helm LGTM

Copy link
Copy Markdown
Member

@giorio94 giorio94 left a comment

Choose a reason for hiding this comment

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

Thanks! Changes look good to me, except for an inline suggestion around the format of the user-facing configuration.

@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 Feb 25, 2026
@MrFreezeex MrFreezeex force-pushed the pr/mrfreezeex/hostaliases-removal branch 3 times, most recently from 32bc223 to 6d8d8a6 Compare February 25, 2026 17:36
@MrFreezeex MrFreezeex removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Feb 25, 2026
@MrFreezeex
Copy link
Copy Markdown
Member Author

/test

@MrFreezeex MrFreezeex force-pushed the pr/mrfreezeex/hostaliases-removal branch from 6d8d8a6 to cdeedc7 Compare February 25, 2026 18:13
This commit add a Cilium config struct parsed from the etcd config to connect
to each remote clustermesh-apiserver. These fields are ignored by etcd
which ignore any unknown fields (like most go program do) and will be
used in a future commit to replace the host aliases on Pods which forces
restarts when changed.

Signed-off-by: Arthur Outhenin-Chalandre <git@mrfreezeex.fr>
Add a new static dialier and wire it in the clustermesh code with the
config that was added in the previous commit.

This new static dialer attempt to be very close to the net.Dialer with very
similar code and partially the same behavior (it has to be a bit
different since we don't resolve anything though). It will fallback to another
dialer so that we can just chain dialer like the one we are already using.

This dialer will attempt every IPs and if the context has a deadline
set it will have partial distribution logic which essentially boils down to
dividing the remaining deadline from the original context with the number of
remaining IPs to attempt connection to. This logic is directly taken from the
net.Dialer logic. Note that to my knowledge we don't have any deadline set
in the ClusterMesh code though.

Signed-off-by: Arthur Outhenin-Chalandre <git@mrfreezeex.fr>
Add the cilium-host-aliases in the etcd config which should be fully replacing
hostaliases in Cilium 1.21. We are keeping hostAliases for now to keep
downgrade safe (secrets updated without cilium-clustermesh-apiserver-host and
potentially without hostAliases if we were already removing it here).

We are force disabling this in the conformance ClusterMesh CI via a non
documented helm values to already exercise that this is working properly
while the conformance upgrade CI stays on default setting to keep the
existing flow tested!

Signed-off-by: Arthur Outhenin-Chalandre <git@mrfreezeex.fr>
Previous commits added a new static dialer in order to replace
hostAliases. This commit now wires this new static dialer to the
clustermesh troubleshoot command.

Signed-off-by: Arthur Outhenin-Chalandre <git@mrfreezeex.fr>
@MrFreezeex
Copy link
Copy Markdown
Member Author

(rebasing below this comment)

@MrFreezeex MrFreezeex force-pushed the pr/mrfreezeex/hostaliases-removal branch from cdeedc7 to 38520ab Compare February 25, 2026 18:15
@MrFreezeex
Copy link
Copy Markdown
Member Author

/test

Copy link
Copy Markdown
Member

@giorio94 giorio94 left a comment

Choose a reason for hiding this comment

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

Thanks!

@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 Mar 2, 2026
@MrFreezeex MrFreezeex enabled auto-merge March 2, 2026 09:01
@MrFreezeex MrFreezeex added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit 96129be Mar 2, 2026
574 of 579 checks passed
@MrFreezeex MrFreezeex deleted the pr/mrfreezeex/hostaliases-removal branch March 2, 2026 09:49
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.

CFP: removing most hostAliases usage in ClusterMesh

6 participants