Skip to content

cilium: minor lb follow-ups #13821

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

Merged
merged 4 commits into from
Oct 31, 2020
Merged

cilium: minor lb follow-ups #13821

merged 4 commits into from
Oct 31, 2020

Conversation

borkmann
Copy link
Member

@borkmann borkmann commented Oct 30, 2020

See commit msgs. Addresses items marked as release-blocker from #13138 .

Normalize status output and dump actual passed values instead of
strings.Title(strings.ToLower()) hackery. Also remove these for cases
where it's not needed.

Signed-off-by: Daniel Borkmann <[email protected]>
We've long moved them out of beta in the main doc.

Signed-off-by: Daniel Borkmann <[email protected]>
@borkmann borkmann added area/daemon Impacts operation of the Cilium daemon. area/misc Impacts miscellaneous areas of the code not otherwise owned by another area. release-note/misc This PR makes changes that have no direct user impact. needs-backport/1.9 labels Oct 30, 2020
@borkmann borkmann requested review from brb, joestringer and a team October 30, 2020 21:08
@borkmann borkmann requested review from a team as code owners October 30, 2020 21:08
@borkmann borkmann requested review from a team, ti-mo and errordeveloper October 30, 2020 21:08
@borkmann borkmann requested a review from a team October 30, 2020 21:25
@borkmann borkmann force-pushed the pr/cilium-lb-follow-ups branch from b638aa6 to 989a34a Compare October 30, 2020 21:30
@borkmann
Copy link
Member Author

test-me-please

@borkmann borkmann mentioned this pull request Oct 30, 2020
25 tasks
@borkmann borkmann force-pushed the pr/cilium-lb-follow-ups branch from 989a34a to 95f20c9 Compare October 30, 2020 21:44
@borkmann
Copy link
Member Author

test-me-please

@borkmann
Copy link
Member Author

retest-gke

@borkmann
Copy link
Member Author

(gke flakes unrelated & random tests)

Copy link
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

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

LGTM.

The rearranging of help text was a bit of a surprise in the middle and I think we do have the option to take one step further on the arg renaming on the Helm side, but assuming we agree with the overall changes the code looks fine. More specific comments below.

@@ -1,98 +0,0 @@
// Copyright 2020 Authors of Cilium
Copy link
Member

Choose a reason for hiding this comment

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

Regarding the help changes:

There are various issues, e.g. flags are forgotten to be added to sections given this needs to be explicitly specified and then we end up with a random chunk of help
flags at the end of the --help dump.

If the random chunk at the end is the problem, I think we can write some simple trickery to ensure the help commands are categorized as part of the build process, so if they're not categorized then we tell the contributor to go back and categorize the flag.

Personally I don't really refer to the help text at all so I can't really speak for whether the sectioning is useful or not, but I was a little surprised to see a CLI change like this in an LB followups PR. Has there been a community discussion on this topic?

The change itself seems to accurately reflect the intent though, so code-wise 👍

Copy link
Member Author

@borkmann borkmann Oct 31, 2020

Choose a reason for hiding this comment

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

I've moved the commit out and will open a separate PR for discussion.

@@ -2494,6 +2500,38 @@ func (c *DaemonConfig) populateDevices() {
}
}

func (c *DaemonConfig) populateLoadBalancerSettings() {
Copy link
Member

Choose a reason for hiding this comment

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

I think BindEnvWithLegacyEnvFallback() achieves the same logic but in a simpler way (albeit with silent preference for the newer option)?

At a glance, the logic below looks right.

@@ -479,7 +479,7 @@ data:
node-port-mode: {{ .Values.nodePort.mode | quote }}
{{- end }}
{{- if hasKey .Values.nodePort "algorithm" }}
node-port-algorithm: {{ .Values.nodePort.algorithm | quote }}
bpf-lb-algorithm: {{ .Values.nodePort.algorithm | quote }}
{{- end }}
Copy link
Member

@joestringer joestringer Oct 31, 2020

Choose a reason for hiding this comment

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

(lines above LGTM) 👍

We're changing a bunch of other Helm options this release, so if we were to also rename the other acceleration/mode options in Helm then this would be a good time to do so.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, do you have some pointers to commits from our side & how we retain backwards compat?

Copy link
Member

Choose a reason for hiding this comment

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

The current approach of the Helm changes replaces every option with an equivalent, differently-named option which the user must specify (using the helm options table in the upgrade guide: https://docs.cilium.io/en/latest/operations/upgrade/#helm-options)

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice, I'll rename the LB ones then, but in new PR.

This adds more generic --bpf-lb-{mode,algorithm,acceleration} which
replace the --node-port-{mode,algorithm,acceleration} options since the
latter have nothing really to do with NodePort itself but are rather
more generic for service load-balancing. The old ones are hidden from
the --help output but can still be used in order to not break existing
setups as alias.

Change the Helm LB algorithm setting from node-port-algorithm over to
bpf-lb-algorithm. This is not emitted by default, and is only newly
introduced in 1.9. I'm not alias'ing anything more at this point wrt
.Values.nodePort* as there are multiple options also from prior releases
that could get a rework for alias'ing here.

Signed-off-by: Daniel Borkmann <[email protected]>
@borkmann borkmann force-pushed the pr/cilium-lb-follow-ups branch from 95f20c9 to a170369 Compare October 31, 2020 20:20
@borkmann
Copy link
Member Author

(CI from current run green)

This option was marked deprecated and scheduled for removal in 1.9.

Similarly as in 1e1ea64 ("daemon, option: remove deprecated
ipv4-cluster-cidr-mask-size option") document this option as removed.

Signed-off-by: Daniel Borkmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/daemon Impacts operation of the Cilium daemon. area/misc Impacts miscellaneous areas of the code not otherwise owned by another area. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants