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

docs(design): phase-1 docs for layer2 support in CAPP: version 1 #786

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

rahulii
Copy link

@rahulii rahulii commented Aug 21, 2024

What this PR does / why we need it:
📖 Proposal for adding layer2 support in CAPP

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #613

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 21, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @rahulii!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-packet 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-packet has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rahulii
Once this PR has been reviewed and has the lgtm label, please assign sbueringer for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 21, 2024
@rahulii rahulii marked this pull request as ready for review August 22, 2024 08:52
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 22, 2024
@k8s-ci-robot k8s-ci-robot requested a review from deitch August 22, 2024 08:52
Copy link

@niravparikh05 niravparikh05 left a comment

Choose a reason for hiding this comment

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

few minor comments, let's add a user flow diagram on the steps CAPP would perform for ease of understanding.

Will go through the user data script in more detail, at a glance it looks good to me.

docs/layer2/layer2_support.md Outdated Show resolved Hide resolved
docs/layer2/layer2_support.md Show resolved Hide resolved
docs/layer2/layer2_support.md Outdated Show resolved Hide resolved
docs/layer2/layer2_support.md Show resolved Hide resolved
Limitations
===========

CAPP managed clusters running without internet connections would need to be able to pull images from a repository also in the layer2, or they would need a bastion host that acts as a gateway and NAT. This isn't supported today, so complete Layer2 will not be supported in the initial phases of the feature.
Copy link
Member

Choose a reason for hiding this comment

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

Noting some additional points. These limitations could be left to the user, to define their image store and routing within the L2 network. Other limitations that are perhaps more core to ClusterAPI and CPEM functioning is the need to interact with Equinix Metal APIs (including Metadata where userdata scripts are accessed at node startup). There may be clever ways to work around these limitations, but we are intentionally keeping ideation and solutioning around full layer2 modes out of scope to get the direct benefits of networking modes that enable L2 capabilities without removing the default L3 public address capabilities.

docs/layer2/layer2_support.md Outdated Show resolved Hide resolved
docs/layer2/layer2_support.md Outdated Show resolved Hide resolved
docs/layer2/layer2_support.md Outdated Show resolved Hide resolved
docs/layer2/layer2_support.md Outdated Show resolved Hide resolved
docs/layer2/layer2_support.md Outdated Show resolved Hide resolved
docs/layer2/layer2_support.md Outdated Show resolved Hide resolved
docs/layer2/layer2_support.md Show resolved Hide resolved
rahulii and others added 3 commits August 27, 2024 12:14
Co-authored-by: Marques Johansson <[email protected]>
Co-authored-by: Nirav Parikh <[email protected]>
Co-authored-by: Marques Johansson <[email protected]>
@displague displague marked this pull request as draft August 27, 2024 18:06
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 27, 2024
@displague
Copy link
Member

displague commented Aug 27, 2024

I've converted this PR to a draft so that we can continue to iterate on design and implementation (#787 and others) in parallel while the design is being vetted.

Sample userdata scripts are going to be hard to vet in markdown format and will be easier to verify in E2E tests from the implementation PRs.

@displague
Copy link
Member

We'll want to update https://github.com/kubernetes-sigs/cluster-api-provider-packet/blob/main/docs/concepts/cluster.md and https://github.com/kubernetes-sigs/cluster-api-provider-packet/blob/main/docs/concepts/machine.md with the results of this design as we get closer to merging the design and implementation.

@rahulii
Copy link
Author

rahulii commented Aug 29, 2024

the results of this design as we get closer to merging the design and implementation.

yah, once we are closer I will make sure to add the changes in those files. Thanks for reminding!

Signed-off-by: rahulii <[email protected]>
echo "8021q" >> /etc/modules

# Generate the network configuration and append it to /etc/network/interfaces for each VLAN-tagged sub-interface.
cat <<EOL >> /etc/network/interfaces
Copy link
Member

Choose a reason for hiding this comment

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

We can write out directly to interfaces.d/something. An example of that here:

https://github.com/equinix-labs/terraform-equinix-metal-hybrid-gateway/blob/main/modules/backend/cloud-config.cfg#L7

Copy link
Member

Choose a reason for hiding this comment

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

Err .. nevermind that example.. It was more involved and manipulated cloud-config.d rather than interfaces.d, it also depended on changing the OS to use netplan:

https://github.com/equinix-labs/terraform-equinix-metal-hybrid-gateway/blob/main/modules/backend/pre-cloud-config.sh

That said, we could write out to an interfaces.d/ file directly. This is just a nitpic and there may be reasons why it is better to take the inline approach you offered, to ensure that the modification is made at the right time relative to other operations.

Copy link
Author

Choose a reason for hiding this comment

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

I really don't have any opinions on /etc/network/interfaces vs /interfaces.d directory 😅
If it seems reasonable to write into /interfaces.d , I will try that out once.

Signed-off-by: rahulii <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 4, 2024
Signed-off-by: rahulii <[email protected]>
@displague displague changed the title docs(): phase-1 docs for layer2 support in CAPP: version 1 docs(design): phase-1 docs for layer2 support in CAPP: version 1 Sep 5, 2024
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 17, 2024
name: capp-ip-allocations
namespace: cluster-api-provider-packet-system
Data:
"da-1000-10.60.10.0/24": |

Choose a reason for hiding this comment

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

examples need to be updated based on our recent discussions, it should not contain the ip cidr

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants