-
Notifications
You must be signed in to change notification settings - Fork 210
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
Improve the helm values autodetection logic #2365
Conversation
It appears that they are no longer used after removing the legacy installation logic. Signed-off-by: Marco Iorio <[email protected]>
Cilium v1.11 and earlier have been EOL for more than six months now. Hence, let's stop caring about them when auto-configuring the helm values. Signed-off-by: Marco Iorio <[email protected]>
The current logic is supposed to automatically enable BPF masquerade when KPR is enabled, and IPv6 is not enabled. However, it looks like it is broken since 9ddd6d8 ("install: Do not use individual HelmOpts"), because we iterate on a map of maps containing the rendered values, but attempt to match the values against --set strings. Instead of fixing it, let's just remove this logic altogether for the sake of simplicity. Additionally, it is potentially fragile, and may lead to surprises to users (as well as in CI) given the difference with respect to the default Cilium's values, and a plain helm install. Signed-off-by: Marco Iorio <[email protected]>
Let's replace the custom logic to retrieve a specific helm value with the unstructured.NestedString method, to ensure consistency among the different call sites. Additionally, this change fixes the retrieval of the routing mode configured by the user, which was previously never obtained correctly, due to a format mismatch. Signed-off-by: Marco Iorio <[email protected]>
Make sure that the autodetected values don't override possible user configurations. Additionally, adapt the kubeProxyReplacement value based on the CIlium version, as strict got deprevated in v1.14. Signed-off-by: Marco Iorio <[email protected]>
15f6ebb
to
947eb71
Compare
The failure appears to be legitimate, as it uncovered an already existing bug causing incorrect KPR features detection when configured using the new format (i.e., true|false). Converting back to draft while addressing it. |
Currently, KPR feature determination considered only the legacy disabled|partial|strict values, while ignoring the false|true possibilities. This issue caused little harm so far because we never directly relied upon it, but only probed for subfeatures (mainly KPRNodePort and KPRHostPort). One special case is represented by north-sourth-loadbalancing/outside-to-nodeport tests, which disable flow validation when the KPR NodePort implementation is disabled. However, due to a bug, this worked only when KPR mode was set to "Disabled", regardless of whether it was enabled or not in all other circumstances. Let's address this by generalizing the KPR feature detection logic, as well as correctly checking the KPR NodePort status as part of the outside-to-nodeport tests. Signed-off-by: Marco Iorio <[email protected]>
Signed-off-by: Marco Iorio <[email protected]>
947eb71
to
5f69a4c
Compare
I've pushed a commit to address the KPR feature detection issue. Back to reviewable state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i didn't know about unstructured.NestedString
. very cool 🥰
@tommyp1ckles @aspsk ping! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks ✔️
6 approvals. good enough for me. |
Please review commit by commit, and refer to the individual messages for additional details.
getHelmValues
logic;bpf.masquerade
autodetection logic;