Closed hh closed 5 months ago
To clarify, you're just requesting to have the option to use NoCloud instead of ConfigDrive?
If that's the case, we can simply allow users to create an empty NoCloud or ConfigDrive volume in the KubeVirtMachine object, and we'll use that volume for the cloud init (our capk controller would fill the rest of the details for the volume) instead of autogenerating the ConfigDrive one like we do today.
Would that work for you?
I think that would work @davidvossel !
@hh Hey, i saw you put a note in the community meeting notes. We're on a bi-weekly cadence right now and that was are off week.
Your question about "how can we help"? Is this code you'd be interested in contributing? if so we can help offer guidance once a PR is posted.
I think a pointer or two into which code needs updating and/or specific docs that would help us start a PR would be great.
I think a pointer or two into which code needs updating and/or specific docs that would help us start a PR would be great.
yeah, absolutely!
If a volume already exists called "cloudinitvolume" in the KubeVirtMachine's spec, then you can make logic that uses that volume to inject the userdata secret rather than the capk controller automatically generating the ConfigDrive one.
so, If the "cloudInitVolume" already exists, then our controller should just set the userdata field for either the ConfigDrive or NoCloud volume source, which ever is defined in the volume. Otherwise, the controller should create a the cloudinitvolume using ConfigDrive by default.
Hopefully that makes sense, let me know if i can clarify it more.
Thanks heaps! Will look into this. /cc @BobyMCbobs
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
The ability to use nocloud instead of configdrive would be very helpful. I see another PR didn't make it here: https://github.com/kubernetes-sigs/cluster-api-provider-kubevirt/pull/224
/reopen
@bzub: Reopened this issue.
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
For anyone who stumbles on this, specifically for trying to use the KubeVirt provider with Talos Linux, you can use the openstack
image from their releases page in your KubevirtMachineTemplate
.
The reason is that "Config drive" is the cloud-init datasource for OpenStack which is technically distinct from NoCloud.
What steps did you take and what happened:
Tried to create a kubevirt capi cluster using cloud-init cloudInitNoCloud data source.
What did you expect to happen:
Ability to specify cloud-init cloudInitNoCloud instead of the hard coded cloudInitConfigDrive data source.
Notes:
Both
cloudInitConfigDrive
andcloudInitNoCloud
are both supported asVolumeSources
by kubevirt in v1.Volume.From cloud-init/cloud-init.go#ReadCloudInitVolumeDataSource() ::
If a
cloudInitNoCloud
is found in thevolumeSources
list, NoCloud is configured, andcloudInitConfigDrive
is ignored.Our NoCloud Implementation Details state:
However, in
cluster-api-provider-kubvirt
we hardcode the thevolumeSource
to becloudInitConfigDrive
when we build the VirtualMachineInstanceTemplateSpec within buildVirtualMachineInstanceTemplate().pkg/kubevirt/utils.go#buildVirtualMachineInstanceTemplate()
This approach means it is not currently possible to use VM Images (like talos) that expect no cloud based ISOs to be attached to the VM for userData and networkData.
Suggestions as to the approach welcome, we attempted to update the KubeVirtVirtualMachineTemplate to use a secret, but it's dynamically named based on the VM. The better approach is to be able to specific the type of init volume (and likley the sub attributes of that type), like the additional network data required by no cloud.