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

Doc: Update k3s cilium installation to match k3s default podCIDR #25270

Merged
merged 1 commit into from May 30, 2023

Conversation

vincentmli
Copy link
Contributor

@vincentmli vincentmli commented May 4, 2023

Current k3s installation instruction allow k3s to
use the default podCIDR 10.42.0.0/16 for pod, which can be seen from node.Spec:

spec:
podCIDR: 10.42.0.0/24
podCIDRs:

  • 10.42.0.0/24

but "cilium install" result in pod IP to be allocated from 10.0.0.0/8 range, this cause confusion to users, the cilium installation should allow allocated pod IP match default k3s podCIDR.

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? Please add yourself to the Users doc
  • Thanks for contributing!

Fixes: #issue-number

Update k3s cilium installation to match k3s default podCIDR

@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 4, 2023
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label May 4, 2023
@vincentmli vincentmli changed the title Doc: Update k3s installation to match podCIDR Doc: Update k3s cilium installation to match k3s default podCIDR May 4, 2023
@maintainer-s-little-helper
Copy link

Commit 0ef08ef83877c9410561cb60cee1fc52c6ca4b93 does not contain "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 4, 2023
@maintainer-s-little-helper
Copy link

Commit 676055067d381c044fe89838e2aa4b3f7e7d9359 does not contain "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 removed the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label May 4, 2023
@vincentmli vincentmli force-pushed the vli-doc branch 2 times, most recently from f334001 to bee9502 Compare May 4, 2023 18:26
@joestringer
Copy link
Member

🤔 do you think it's possible for cilium install to autodetect this range somehow by querying the cluster?

@vincentmli
Copy link
Contributor Author

🤔 do you think it's possible for cilium install to autodetect this range somehow by querying the cluster?

it might be possible, not familiar with cilium cli and how easy to implement that, not much in autodetect for k3s https://github.com/cilium/cilium-cli/blob/main/install/autodetect.go, assume cilium cli found the podCIR, cilium cli would still do something with ipam.operator.clusterPoolIPv4PodCIDR, no? still prefer simple document update :)

@joestringer
Copy link
Member

Yeah, that's the key question - If the Pod CIDR is somehow exposed through some resource for example then we could potentially implement this in an automatic way for every user of the Cilium-CLI. K3s isn't the only platform that may encounter this problem, so if we can come up with a reasonable solution for other platforms as well then we should.

At the same time, I appreciate that this docs change is more immediate and practical, so I'm not against simply documenting this as an alternative. 👍

@vincentmli
Copy link
Contributor Author

I agree cilium cli could be more smart to detect the cluster and setup the correct podCIDR.

@vincentmli vincentmli marked this pull request as ready for review May 5, 2023 15:07
@vincentmli vincentmli requested a review from a team as a code owner May 5, 2023 15:07
Copy link
Contributor

@zacharysarah zacharysarah left a comment

Choose a reason for hiding this comment

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

One nit, otherwise LGTM. Approving preemptively with the understanding that the change must be made prior to merge.

Documentation/installation/k3s.rst Outdated Show resolved Hide resolved
Current k3s installation instruction allow k3s to
use the default podCIDR 10.42.0.0/16 for pod, which
can be seen from node.Spec:

spec:
  podCIDR: 10.42.0.0/24
  podCIDRs:
  - 10.42.0.0/24

but "cilium install" result in pod IP to be allocated from
10.0.0.0/8 range, this cause confusion to users, the cilium
installation should allow allocated pod IP match default k3s
podCIDR.

Signed-off-by: Vincent Li <v.li@f5.com>
@joestringer joestringer added the release-note/misc This PR makes changes that have no direct user impact. label May 30, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label May 30, 2023
@joestringer joestringer merged commit d3f2bcb into cilium:main May 30, 2023
36 checks passed
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. 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.

None yet

3 participants