-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Inconsistent behavior between public-ipv6 annotations and public-ipv6 cli option #1813
Comments
Hi thanks for reporting this. Checking from the code the public-ip is used only to select the interface and what you are saying is right. We can rework the code to force to use the same defined IP in case of multiple IPs on that interface. |
Thanks for your response. Let me clarify a bit more. The I'm guessing this is the behavior that you mention which could updated in the code, right? That would be very helpful, because this is a setting that we can't control with helm chart values in RKE2. Flannel is deployed as container that calls the
|
Yes you are right I'm inspecting the code to check if there are a possible solution for your issue. |
Ok you are right. How you wrote on the issue there is a |
Initially, I found a reference to flannel/pkg/subnet/kube/annotations.go Line 68 in 44f5584
Regarding the
Regarding the meaning of the What I understand from your explanation is that the annotation on nodeX is used as destination address by nodeY for inter-node packets send by nodeY to nodeX, right?
The node with IP 10.50.147.105 still uses 10.50.147.106 as destination. Am I missing something here? |
I found the original issue #712 |
Any update on this? |
Hi I tested it and you are right. The override seems to be noticed when flannel starts but the actual value is not updated. I am trying to understand if I could find a fix for it. |
Just to keep this active, we would still like to have a fix for this. We're happy to help testing :). |
Fixed, thanks! |
Expected Behavior
The node annotation
flannel.alpha.coreos.com/public-ipv6
orflannel.alpha.coreos.com/public-ipv6-overwrite
(if set), should have the same impact as setting the--public-ipv6
option of theflanneld
binary.Current Behavior
--public-ipv6
cli option, the external address used by flannel seems to always be the first address of the interface which also has the address from the annotations.--public-ipv6
cli option, the external address used by flannel is always the address given by the cli option.Possible Solution
Steps to Reproduce (for bugs)
Example config for a master node (/etc/rancher/rke2/config.yaml):
Example config for a worker node (/etc/rancher/rke2/config.yaml)
On the worker node, add an extra IPv6 address to the interface that is used for inter-pod traffic
ip a add 2001:x:x:x:x:x:x:229/64 dev ens192
Delete the canal pod that's running on the worker node
kubectl delete pod rke2-canal-... -n kube-system
Observe that the flannel logs of the worker node mention the wrong external address (
2001:x:x:x:x:x:x:229
iso2001:x:x:x:x:x:x:105
)The echo reply is sent with source address
2001:x:x:x:x:x:x:229
iso2001:x:x:x:x:x:x:105
on the worker node.Context
We have a dual-stack cluster setup with rancher RKE2. ON the interface that is used for inter-node kubernetes traffic there are multiple IPv6 addresses. We want to specifically use one of those addresses, not necessarily the first one, so that inter-node kubernetes packets have that source address. In rancher RKE2, flannel (as part of canal) is deployed via a rancher provided helm chart, which we don't want to manually modify. The only option to force the use of a specific public IPv6 address is to set the public-ipv6 annotations, which don't seem to have the expected behavior.
Your Environment
Edit: Added rke2-canal-config config map data.
The text was updated successfully, but these errors were encountered: