-
Notifications
You must be signed in to change notification settings - Fork 50
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
image: add kubevirt image build #1962
Conversation
27ea7f4
to
622bdcf
Compare
...container/src/third_party/coreos-overlay/coreos-base/afterburn/files/coreos-metadata.service
Show resolved
Hide resolved
Tested locally on my Kubevirt Environment and the image works as expected. Workflow:
virtctl image-upload pvc flatcar-kubevirt-pvc --size=10Gi --image-path flatcar_production_kubevirt_image.qcow2
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
generation: 1
labels:
kubevirt.io/os: linux
name: vm-flatcar
spec:
running: true
template:
metadata:
creationTimestamp: null
labels:
kubevirt.io/domain: vm-flatcar
spec:
architecture: amd64
nodeSelector:
kubernetes.io/arch: amd64
domain:
cpu:
cores: 2
devices:
disks:
- disk:
bus: virtio
name: disk0
- cdrom:
bus: sata
readonly: true
name: cloudinitdisk
machine:
type: q35
resources:
requests:
memory: 1024M
volumes:
- name: disk0
persistentVolumeClaim:
claimName: flatcar-kubevirt-pvc
- cloudInitConfigDrive:
userData: |
{"ignition":{"version":"3.3.0"},"kernelArguments":{"shouldExist":["flatcar.autologin"]},"passwd":{"users":[{"name":"core","passwordHash":"$6$sn3ZSJJJln5JkAZb$VDTKzLpCyjlEe7Kh0DKjOnEawkkOoi0tOKVbcCv0FIWSf3u9Y1p1I5YdJJ5L8uDmmMvO2CBlmJZNdxFuekjjE1"}]}}
name: cloudinitdisk
|
Build action triggered: https://github.com/flatcar/scripts/actions/runs/8890177334 |
622bdcf
to
79bc25a
Compare
@pothos thank you for the comments. I have created the PR to enable hostname set using the metadata from the config drive: |
I will also start a documentation PR with the discussion resume on how Ignition or coreos-cloudinit works and in what scenarios, plus the above examples / steps to run Flatcar with KubeVirt. |
79bc25a
to
886e948
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Tested locally on KubeVirt using Ignition and Bash userdata, and all works as expected. |
As Ignition supports KubeVirt, add a custom oem for it and also the required parts to be able to build an image in .qcow2 format that is already using internal .qcow2 gzip compression. Fixes: flatcar/Flatcar#1358 Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
886e948
to
6efe345
Compare
As Ignition supports KubeVirt, add a custom oem for it and also the required parts to be able to build an image in .qcow2 format and .gz compression.
Fixes: flatcar/Flatcar#1358