flannel-io / flannel

flannel is a network fabric for containers, designed for Kubernetes
Apache License 2.0
8.61k stars 2.87k forks source link

Can flannel set forceAddress parameters? #1850

Open tanberBro opened 6 months ago

tanberBro commented 6 months ago

Expected Behavior

I want to add a forceAddress parameter to the parameter passed to bridge cni so that he can perform the following logic:

image

Current Behavior

My current configuration does not have forceAddress parameters. In some cases, the pod reported an error: 企业微信截图_06982571-b90e-4e0d-bbbc-e755fe21c8a8

Possible Solution

Set forceAddress parameters in flannel config.

Context

The reason why the pod reports an error is: This node was originally a node in cluster 1, but now it has become a node in cluster 2, causing the subnet to change.

Your Environment

tanberBro commented 6 months ago

@rbrtbnfgl

rbrtbnfgl commented 6 months ago

do you cleaned the node when it joined the second cluster?

tanberBro commented 6 months ago

flannel configuration and bridge not cleaned up,

Need a separate cleaning?

@rbrtbnfgl

rbrtbnfgl commented 6 months ago

yes Flannel is not cleaning older configuration like routes and bridge interface.

stale[bot] commented 5 days ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.