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

📖 Add KubeVirt instructions to tilt.md #11697

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

johananl
Copy link
Member

What this PR does / why we need it:

This PR adds instructions for local development using KubeVirt as an alternative to CAPD.

This is useful in cases where CAPD can't be used for whatever reason, with one example being developing Ignition-related features (since Ignition runs in early boot and therefore can't be containerized easily).

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

/area devtools

Signed-off-by: Johanan Liebermann <[email protected]>
@k8s-ci-robot k8s-ci-robot added the area/devtools Issues or PRs related to devtools label Jan 17, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 17, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign neolit123 for approval. For more information see the 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 Jan 17, 2025
@johananl johananl changed the title Add KubeVirt instructions to tilt.md 📖 Add KubeVirt instructions to tilt.md Jan 17, 2025
@sbueringer
Copy link
Member

Is there someone who is familiar with KubeVirt that could do a first review?

@nunnatsa
Copy link
Contributor

nunnatsa commented Jan 22, 2025

Hi @johananl

Thanks for this PR. As far as I can see, this is based on the KubeVirt sections in the quickstart guide.

I just opened a PR to update it, as it didn't work for me now (I was working when I wrote it...). Maybe you want to take a look?

#11734

Copy link
Member

@fabriziopandini fabriziopandini 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 writing this down.
It will be great if we can do a further step and re-use the existig scrpt for creating kind + registry as well as create a new script for automating most of the steps described in this doc

{{#/tab }}
{{#tab KubeVirt}}

Create a ctlptl configuration for a kind cluster with a local container registry:
Copy link
Member

Choose a reason for hiding this comment

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

./hack/kind-install-for-capd.sh already creates a kind cluster with a registry, the only thing it does not support is to disable CNI.

Have you considered to improve ./hack/kind-install-for-capd.sh so we can have a consistent UX (re-use the same registry which persist across test runs, avoid ctlptl + related config file)

Copy link
Member Author

Choose a reason for hiding this comment

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

I liked the fact that ctlptl creates and destroys stuff reliably but I'm not attached to it in any way. I'm happy to improve this script. While at it I'll see if we can clean up things better since this script seems to leave a dangling registry container.

Copy link
Member

Choose a reason for hiding this comment

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

Can we keep image registry handling as it is given that it is orthogonal to this PR?

I don't remember exact details, but it was intentional to leave the registry around.
Probably something about avoiding to reload images e.g. in case you are testing on a fixed tag name, but I don't have time to look this up ATM

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added ./hack/kind-install-for-kubevirt.sh that's based on the existing CAPD script. I like this more than the instructions (not sure why I haven't thought about this in the first place).

I'll update the Markdown file soon.

ctlptl apply -f kind-kubevirt.yaml
```

Deploy Calico as the CNI:
Copy link
Member

Choose a reason for hiding this comment

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

TBH I think we should have a scrpt to install CNI + MetalLB + KubeVirt, something like ./hack/kind-install-for-kubevirt.sh (that re-uses the existing script for the first part)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues or PRs related to devtools cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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