Skip to content
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

helm: add default tunnel values in configmap #26712

Merged

Conversation

3u13r
Copy link
Contributor

@3u13r 3u13r commented Jul 7, 2023

This PR fixes the feature discovery for tunneling in cilium-cli.

Background:
With the new routingMode and tunnelProtocol helm values, the default is not filled in as a value in values.yaml anymore (in contrast to the old tunnel value, see: https://github.com/cilium/cilium/pull/24561/files). Therefore, those default values don't show up in the config-map. The cilium-cli tries to get the enabled features by (among other things) reading out the config-map. Since it does not find any value, it sets the feature to Enabled: false (see: cilium-cli/check/features.go:209 or https://github.com/cilium/cilium-cli/pull/1655/files)

Of course there are multiple places to fix this behavior. I opted for this solution as I think that the configuration should always be reflected in the configmap for visibility reasons. Especially if the default is tunneling + vxlan not disabled tunneling.

Add the tunnel values to the config map even when the default values are used.

Signed-off-by: Leonard Cohnen <lc@edgeless.systems>
@3u13r 3u13r requested review from a team as code owners July 7, 2023 15:19
@3u13r 3u13r requested review from joamaki and kaworu July 7, 2023 15:19
@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 Jul 7, 2023
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Jul 7, 2023
@kaworu kaworu added kind/enhancement This would improve or streamline existing functionality. release-note/misc This PR makes changes that have no direct user impact. area/helm Impacts helm charts and user deployment experience release-blocker/1.14 This issue will prevent the release of the next version of Cilium. needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Jul 10, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Jul 10, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.14.0 Jul 10, 2023
Copy link
Member

@kaworu kaworu left a comment

Choose a reason for hiding this comment

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

Thanks for the patch and clear description @3u13r, LGTM. Since this compatibility issue with the cilium-cli affects v1.14 I added the needs-backport/1.14 label. Also pulling @pchaigno for review.

[…] Of course there are multiple places to fix this behavior. I opted for this solution as I think that the configuration should always be reflected in the configmap for visibility reasons.

That make sense to me. However I still think the cilium-cli should default to the same values as Helm / cilium-agent. Let me know if you're willing to open a PR at https://github.com/cilium/cilium-cli 🙏

@kaworu kaworu requested a review from pchaigno July 10, 2023 09:42
@pchaigno
Copy link
Member

Why should default values be visible in the ConfigMap? We have many many flags that are not visible in the ConfigMap when set to their defaults. If I understand correctly the rationale for this change, it sounds like a bug that needs to be fixed in the CLI.

@kaworu
Copy link
Member

kaworu commented Jul 10, 2023

Why should default values be visible in the ConfigMap? We have many many flags that are not visible in the ConfigMap when set to their defaults. If I understand correctly the rationale for this change, it sounds like a bug that needs to be fixed in the CLI.

Yes, it's a bug that needs to be fixed in the CLI. On the Cilium side, this PR is case in point of why default values in the ConfigMap are useful: so that we don't have to duplicate and maintain them in the Cilium CLI. Why not do both?

@joamaki
Copy link
Contributor

joamaki commented Jul 10, 2023

Hmm, tricky. I see the point of having it in helm values, but on the flip side having defaults picked there would mean we'd have two defaults: one in cilium-agent's command-line/config flag and one in the template, which isn't great either. Though the default in the helm values is the one users see, which is why I'd prefer to merge this fix.

@pchaigno is also right in that cilium-cli should not rely on ConfigMap as cilium does not require any config options to be set and thus the mechanism used in cilium-cli is inherently faulty and a better mechanism would be to interrogate the actual options picked at runtime.

@pchaigno
Copy link
Member

One thing I like about not having the defaults in the ConfigMap is that it makes it very easy to understand what is different in this installation from a default installation. That's often key in understanding problems.

But we have definitely never enforced it one way or the other, so not blocking this PR :-)

@nebril
Copy link
Member

nebril commented Jul 12, 2023

/test

@julianwiedmann
Copy link
Member

If we've reached consensus here (which seems to be the case), could one of the reviewers add ready-to-merge? Thank you!

@pchaigno pchaigno merged commit 881c250 into cilium:main Jul 14, 2023
66 checks passed
@aanm aanm mentioned this pull request Jul 14, 2023
6 tasks
@aanm aanm added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Jul 14, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.14 in 1.14.0 Jul 14, 2023
@gandro gandro added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Jul 17, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.14 to Backport done to v1.14 in 1.14.0 Jul 17, 2023
@burgerdev burgerdev deleted the add-default-tunnel-values-to-configmap branch January 24, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Impacts helm charts and user deployment experience backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. kind/community-contribution This was a contribution made by a community member. kind/enhancement This would improve or streamline existing functionality. release-blocker/1.14 This issue will prevent the release of the next version of Cilium. release-note/misc This PR makes changes that have no direct user impact.
Projects
No open projects
1.14.0
Backport done to v1.14
Development

Successfully merging this pull request may close these issues.

None yet

8 participants