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
CNV#21150: instance types API #75235
base: main
Are you sure you want to change the base?
Conversation
🤖 Tue May 07 16:38:18 - Prow CI generated the docs preview: |
d5a5818
to
4cf9d29
Compare
f603674
to
6d59e38
Compare
/lgtm |
@RoniKishner Hi, can you please review this PR from the QE perspective? Thank you! |
+ | ||
:FeatureName: Creating a VM from an instance type | ||
include::snippets/technology-preview.adoc[] | ||
You can create a VM by using a Red Hat template or an xref:../../virt/virtual_machines/creating_vms_rh/virt-creating-vms-from-instance-types.adoc#virt-creating-vms-from-instance-types[instance type]. |
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.
Should this be a separate bullet, as it links to a different assembly than Create a VM from a Red Hat image? It is a touch confusing to me.
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.
Good spot. I think there's some rework that needs to be done here in general, because there is overlap between the procedures in the "custom images" and "RH images" directories, and I think the separation is doing more harm than good. Sadly.
(I'm pretty sure that this link was attached to the previous bullet because the instance type assembly is in the "creating_vms_rh" directory.)
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.
I think I'm going to leave this as-is and try to address it in a follow-up PR.
@ousleyp Overall looks good. A few suggestions/questions. I am not sure what you changed in Configuring SSH access to virtual machines, however. Otherwise LGTM. |
Great question. It was in this list of build preview links and I lazily assumed I had forgotten some random change... my apologies for the confusion! Thanks so much for the thoughtful review, as always, @mburke5678 ! |
New changes are detected. LGTM label has been removed. |
Great to see this documented! Can the example yaml in "Creating a VM from a VirtualMachine manifest" in https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/creating_vms_rh/virt-creating-vms-from-cli.html#virt-creating-vm-cli_virt-creating-vms-cli be also adopted to use instancetypes? A very minimalistic VM would be
|
Great suggestion, thanks! I just changed that example to the manifest you provided and attempted to give some additional information in the callouts. Can you please review, @dominikholler ? Thanks! |
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 @ousleyp .
If I may request another change, can the two examples in https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/virt-accessing-vm-ssh.html#virt-adding-public-key-cli_static-key and https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/virt-accessing-vm-ssh.html#virt-creating-vm-instancetype_dynamic-key be updated to
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: example-vm
spec:
dataVolumeTemplates:
- metadata:
name: example-vm-volume
spec:
sourceRef:
kind: DataSource
name: rhel9
namespace: openshift-virtualization-os-images
storage:
resources: {}
instancetype:
name: u1.medium
preference:
name: rhel.9
running: true
template:
spec:
domain:
devices: {}
volumes:
- dataVolume:
name: example-vm-volume
name: rootdisk
- cloudInitNoCloud:
userData: |-
#cloud-config
user: cloud-user
name: cloudinitdisk
accessCredentials:
- sshPublicKey:
propagationMethod:
noCloud: {}
source:
secret:
secretName: authorized-keys
---
apiVersion: v1
kind: Secret
metadata:
name: authorized-keys
data:
key: c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDMU0rTDNSMUh4YjI3bFdjdjBJU01nYzhQcHVTcG1XUnRNTWFoR3BtRU5xQk5SSkZXbVhnMVlkeTFxRTNOSXJ4VzdGZmxZelRyOXlnRXZvZDhVNDBmVkNpMnRybnhEd2g5UHJUNzBCS29TcHZLazlTSzZ6ME10SWgxUEk5SDM0ME5YSW5DRGdwZkFFK200eVcwaFlQUWtkZzFZajRQOElVZEczV3pvOHZxK0dmM0M2aHVCVG5HNmpNekZVZEFGcUxrd0hEY3hRc0RjcXl2UFdvU0NzREg1OTM3aWRVZDE0MTRXRlU3bW5xOTBIRXRZbjFYcmt5SUpPSzFtOVk3K3RkSW1jNWJDcjNhN2J3WXVBRWZ6M2pZOGh5NVFYZDdWb29RaXg4UW5vMCtsOE9TWFZBWExaOW1lVGdkRUwxcEJ4Y2hUY2ZsZWU0ekhjQk5RMXdEZnNUSnYgZG9taW5pa0B0NDYwcA==
and the dynamic one to
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: example-vm
spec:
dataVolumeTemplates:
- metadata:
name: example-vm-volume
spec:
sourceRef:
kind: DataSource
name: rhel9
namespace: openshift-virtualization-os-images
storage:
resources: {}
instancetype:
name: u1.medium
preference:
name: rhel.9
running: true
template:
spec:
domain:
devices: {}
volumes:
- dataVolume:
name: example-vm-volume
name: rootdisk
- cloudInitNoCloud:
userData: |-
#cloud-config
runcmd:
- [ setsebool, -P, virt_qemu_ga_manage_ssh, on ]
name: cloudinitdisk
accessCredentials:
- sshPublicKey:
propagationMethod:
qemuGuestAgent:
users: ["cloud-user"]
source:
secret:
secretName: authorized-keys
---
apiVersion: v1
kind: Secret
metadata:
name: authorized-keys
data:
key: c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDMU0rTDNSMUh4YjI3bFdjdjBJU01nYzhQcHVTcG1XUnRNTWFoR3BtRU5xQk5SSkZXbVhnMVlkeTFxRTNOSXJ4VzdGZmxZelRyOXlnRXZvZDhVNDBmVkNpMnRybnhEd2g5UHJUNzBCS29TcHZLazlTSzZ6ME10SWgxUEk5SDM0ME5YSW5DRGdwZkFFK200eVcwaFlQUWtkZzFZajRQOElVZEczV3pvOHZxK0dmM0M2aHVCVG5HNmpNekZVZEFGcUxrd0hEY3hRc0RjcXl2UFdvU0NzREg1OTM3aWRVZDE0MTRXRlU3bW5xOTBIRXRZbjFYcmt5SUpPSzFtOVk3K3RkSW1jNWJDcjNhN2J3WXVBRWZ6M2pZOGh5NVFYZDdWb29RaXg4UW5vMCtsOE9TWFZBWExaOW1lVGdkRUwxcEJ4Y2hUY2ZsZWU0ekhjQk5RMXdEZnNUSnYgZG9taW5pa0B0NDYwcA==
@dominikholler , thanks for the feedback! I have added a link to the SSH page and a note regarding the lack of authentication config to this PR, but I have not yet updated the YAMLs on the SSH page. That page is a little complicated because it uses one YAML with conditionals to cover both static and dynamic. I'll work on making that update shortly. |
@dominikholler , I changed up the YAMLs on the SSH page. Please take a look when you can; thanks! :) Here are the preview build pages that are specific to those YAMLs: |
@ousleyp: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Version(s): 4.15+
Issue: CNV-21150
Links to docs preview:
Primary pages updated
New YAMLs
Minor updates
QE review:
Additional information: