Skip to content

Conversation

kvaps
Copy link
Member

@kvaps kvaps commented May 27, 2024

  • Introduce --enforce-device-detection option
  • Helm chart: enforceDeviceDetection option
  • Add tests for EnforceDeviceDetection option

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Added Add Ænix to the cilium users #32738
  • Thanks for contributing!

Fixes: #32721

Introduce --force-device-detection option to apply the auto-detection criteria also when devices are explicitly listed with --devices.

@kvaps kvaps requested review from a team as code owners May 27, 2024 11:18
@kvaps kvaps requested review from ldelossa, asauber and nebril May 27, 2024 11:18
@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 May 27, 2024
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label May 27, 2024
@kvaps kvaps changed the title enforce device detection v1.16 Introduce --enforce-device-detection option (v1.16) May 27, 2024
@kvaps kvaps force-pushed the enforce-device-detection-v1.16 branch from d313db1 to 16f00d0 Compare May 27, 2024 11:23
@borkmann borkmann requested a review from joamaki May 27, 2024 11:29
@kvaps kvaps force-pushed the enforce-device-detection-v1.16 branch 4 times, most recently from 03d7554 to e151d49 Compare May 27, 2024 14:54
@maintainer-s-little-helper
Copy link

Commit e08b21e does not match "(?m)^Signed-off-by:".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label May 27, 2024
@kvaps kvaps changed the title Introduce --enforce-device-detection option (v1.16) Introduce --enforce-device-detection option May 27, 2024
@kvaps kvaps force-pushed the enforce-device-detection-v1.16 branch from e08b21e to 7470f86 Compare May 27, 2024 16:43
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label May 27, 2024
@kvaps kvaps force-pushed the enforce-device-detection-v1.16 branch 3 times, most recently from e8c3fca to 5378e49 Compare May 27, 2024 16:55
Copy link
Contributor

@ldelossa ldelossa left a comment

Choose a reason for hiding this comment

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

Overall these changes look OK to me.

The same set of checks over devices is performed, eliminating the possibility of 'over-selecting'.

@joestringer
Copy link
Member

Could you speak a bit about why we need three options for configuring devices? I would have expected one of two:

(a) Auto-detection. Cilium tries its best to select devices, and Cilium is responsible for picking the devices.
(b) Case (a) didn't work for some reason (bug?), so the user wants to override the set of devices. In this case Cilium is clearly not responsible for picking the devices.

Case (c) Both Cilium and the user specify devices seems like it confuses who is responsible for this logic, and it's yet another complicated flag in an already complicated set of flags for the agent. Can't we just fix (a) or (b) to better cover your use case?

@kvaps
Copy link
Member Author

kvaps commented May 29, 2024

@joestringer sure, I can explain. The reason is that we're not end user, we're adopting Cilium together with kube-ovn in Cozystack a free platform for running managed services. We need kube-ovn as it provides extensive network fabric for running VirtualMachines using KubeVirt.

Our users might have various hardware configurations with various interfaces, eg. some of them using bonding and vlan interfaces, some of them are not, so devices must be auto-detected.

But in order to make this configuration working, the ovn0 device should also be added to the list of auto-detected devices.

The reason I'm insist for adding an extra option and not extend autodetection rules, is that I don't want to break exiting installations. Eg. OpenShift project also uses OVN but different implementation ovn-kubernetes. Some other users might want to run Kubernetes with Cilium on hypervisors with OVN which is unrelated to the Kubernetes networking. Eg, Mirantis uses Kubernetes to provision OpenStack platform, OVN is a default networking for OpenStack for now.

Another user-story that I see is that there might be other users who might want to do the same, eg. to create an extra VPN device on every node, that must be always specified in a list in addition to auto-detection rules.

@kvaps
Copy link
Member Author

kvaps commented Jun 5, 2024

/test

@kvaps
Copy link
Member Author

kvaps commented Jun 5, 2024

/ci-e2e

@kvaps
Copy link
Member Author

kvaps commented Jun 5, 2024

/ci-ginkgo

@kvaps
Copy link
Member Author

kvaps commented Jun 5, 2024

/ci-ingress

@kvaps
Copy link
Member Author

kvaps commented Jun 5, 2024

/ci-ginkgo

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jun 5, 2024
@kvaps
Copy link
Member Author

kvaps commented Jun 5, 2024

@aanm @joestringer all tests have passed 🎉

@aanm aanm added this pull request to the merge queue Jun 5, 2024
Merged via the queue into cilium:main with commit ce59386 Jun 5, 2024
@brb
Copy link
Member

brb commented Jun 7, 2024

@kvaps Thanks for the PR. Do you mind to update the documentation too ( Documentation/network/kubernetes/kubeproxy-free.rst)?

kvaps added a commit to cozystack/cozystack that referenced this pull request Aug 12, 2024
The new Cilium already enables our patch
cilium/cilium#32730. It should be better to
update instead of keeping it in-tree

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request Mar 8, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent.  The current documentation is ambiguous:
*  It is unclear that this option can only be used when the --devices option is set
*  It is unclear that this option is additive, and is not a post-matching filter for those devices matched by --devices.

One can only understand the true meaning of this flag by reading through the comments of the original PR.

This commit improves the help shown for cilium-agent, the comments on the Helm chart, and the comments in the source where the feature is implemented.

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request Mar 8, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent.  The current documentation is ambiguous:
*  It is unclear that this option can only be used when the --devices option is set
*  It is unclear that this option is additive, and is not a post-matching filter for those devices matched by --devices.

One can only understand the true meaning of this flag by reading through the comments of the original PR.

This commit improves the help shown for cilium-agent, the comments on the Helm chart, and the comments in the source where the feature is implemented.

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request Mar 8, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent.  The current documentation is ambiguous:
*  It is unclear that this option can only be used when the --devices option is set
*  It is unclear that this option is additive, and is not a post-matching filter for those devices matched by --devices.

One can only understand the true meaning of this flag by reading through the comments of the original PR.

This commit improves the help shown for cilium-agent, the comments on the Helm chart, and the comments in the source where the feature is implemented.

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request Mar 8, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent.  The current documentation is ambiguous:
*  It is unclear that this option can only be used when the --devices option is set
*  It is unclear that this option is additive, and is not a post-matching filter for those devices matched by --devices.

One can only understand the true meaning of this flag by reading through the comments of the original PR.

This commit improves the help shown for cilium-agent, the comments on the Helm chart, and the comments in the source where the feature is implemented.

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request Mar 8, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent.  The current documentation is ambiguous.

This commit aims to reduce confusion by making the following changes:
1) Added the --devices flag to the Helm command reference guide.
2) Revised the description shown for forceDeviceDetection in Helm and --force-device-detection in the Agent's command reference guide.
3) Revised the comments across related source files.
4) Renamed the variable enforceDeviceDetection to forceDeviceDetection on the related datapath source code to be consistent with the user-facing name. In the original PR, the option was named enforce and reviewers asked that it be renamed to force. One variable with two references was left using the original name.

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request Mar 8, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent. The current documentation is ambiguous.

This commit aims to reduce confusion by making the following changes:
1) Added the --devices flag to the Helm command reference guide.
2) Revised the description shown for forceDeviceDetection in Helm and --force-device-detection in the Agent's command reference guide.
3) Revised the comments across related source files.
4) Renamed the variable enforceDeviceDetection to forceDeviceDetection on the related datapath source code to be consistent with the user-facing name. In the original PR, the option was named enforce and reviewers asked that it be renamed to force. One variable with two references was left using the original name.

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request Mar 15, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent. The current documentation is ambiguous.

This commit aims to reduce confusion by making the following changes:
1) Added the --devices flag to the Helm command reference guide.
2) Revised the description shown for forceDeviceDetection in Helm and --force-device-detection in the Agent's command reference guide.
3) Revised the comments across related source files.
4) Renamed the variable enforceDeviceDetection to forceDeviceDetection on the related datapath source code to be consistent with the user-facing name. In the original PR, the option was named enforce and reviewers asked that it be renamed to force. One variable with two references was left using the original name.

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request Mar 15, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent. The current documentation is ambiguous.

This commit aims to reduce confusion by making the following changes:
1) Added the --devices flag to the Helm command reference guide.
2) Revised the description shown for forceDeviceDetection in Helm and --force-device-detection in the Agent's command reference guide.
3) Revised the comments across related source files.
4) Renamed the variable enforceDeviceDetection to forceDeviceDetection on the related datapath source code to be consistent with the user-facing name. In the original PR, the option was named enforce and reviewers asked that it be renamed to force. One variable with two references was left using the original name.

Fixes: cilium#37425

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request Mar 15, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent. The current documentation is ambiguous.

This commit aims to reduce confusion by making the following changes:
1) Added the --devices flag to the Helm command reference guide.
2) Revised the description shown for forceDeviceDetection in Helm and --force-device-detection in the Agent's command reference guide.
3) Revised the comments across related source files.
4) Renamed the variable enforceDeviceDetection to forceDeviceDetection on the related datapath source code to be consistent with the user-facing name. In the original PR, the option was named enforce and reviewers asked that it be renamed to force. One variable with two references was left using the original name.

Fixes: cilium#37425

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request Mar 15, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent. The current documentation is ambiguous.

This commit aims to reduce confusion by making the following changes:
1) Added the --devices flag to the Helm command reference guide.
2) Revised the description shown for forceDeviceDetection in Helm and --force-device-detection in the Agent's command reference guide.
3) Revised the comments across related source files.
4) Renamed the variable enforceDeviceDetection to forceDeviceDetection on the related datapath source code to be consistent with the user-facing name. In the original PR, the option was named enforce and reviewers asked that it be renamed to force. One variable with two references was left using the original name.

Fixes: cilium#37425

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request May 14, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent. The current documentation is ambiguous.

This commit aims to reduce confusion by making the following changes:
1) Added the --devices flag to the Helm command reference guide.
2) Revised the description shown for forceDeviceDetection in Helm and --force-device-detection in the Agent's command reference guide.
3) Revised the comments across related source files.
4) Renamed the variable enforceDeviceDetection to forceDeviceDetection on the related datapath source code to be consistent with the user-facing name. In the original PR, the option was named enforce and reviewers asked that it be renamed to force. One variable with two references was left using the original name.

Fixes: cilium#37425

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request May 14, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent. The current documentation is ambiguous.

This commit aims to reduce confusion by making the following changes:
1) Added the --devices flag to the Helm command reference guide.
2) Revised the description shown for forceDeviceDetection in Helm and --force-device-detection in the Agent's command reference guide.
3) Revised the comments across related source files.
4) Renamed the variable enforceDeviceDetection to forceDeviceDetection on the related datapath source code to be consistent with the user-facing name. In the original PR, the option was named enforce and reviewers asked that it be renamed to force. One variable with two references was left using the original name.

Fixes: cilium#37425

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request May 14, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent. The current documentation is ambiguous.

This commit aims to reduce confusion by making the following changes:
1) Added the --devices flag to the Helm command reference guide.
2) Revised the description shown for forceDeviceDetection in Helm and --force-device-detection in the Agent's command reference guide.
3) Revised the comments across related source files.
4) Renamed the variable enforceDeviceDetection to forceDeviceDetection on the related datapath source code to be consistent with the user-facing name. In the original PR, the option was named enforce and reviewers asked that it be renamed to force. One variable with two references was left using the original name.

Fixes: cilium#37425

Signed-off-by: David Swafford <dswafford@coreweave.com>
dswaffordcw added a commit to dswaffordcw/cilium that referenced this pull request May 14, 2025
Under cilium#32730, the --force-device-detection option was introduced to cilium-agent. The current documentation is ambiguous.

This commit aims to reduce confusion by making the following changes:
1) Added the --devices flag to the Helm command reference guide.
2) Revised the description shown for forceDeviceDetection in Helm and --force-device-detection in the Agent's command reference guide.
3) Revised the comments across related source files.
4) Renamed the variable enforceDeviceDetection to forceDeviceDetection on the related datapath source code to be consistent with the user-facing name. In the original PR, the option was named enforce and reviewers asked that it be renamed to force. One variable with two references was left using the original name.

Fixes: cilium#37425

Signed-off-by: David Swafford <dswafford@coreweave.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/community-contribution This was a contribution made by a community member. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CFP: Option to append device to autodetected devices list
8 participants