Skip to content

Commit

Permalink
dataImportCronTemplates: Add default instance type labels (kubevirt#2202
Browse files Browse the repository at this point in the history
)

Support has recently landed in KubeVirt [1][2] allowing default
instance types and preferences to be inferred from a given Volume
associated with a VirtualMachine.

Additional support has now also landed in CDI [3][4] allowing the
labels controlling this behaviour to be passed down from
DataImportCrons to DataVolumes, DataSources and PVCs created as part of
the import process.

This change adds these labels to the default
DataImportCronTemplates provided by HCO to the SSP operator that leads
to the creation of the initial DataImportCron resources. The above
changes then should result in these labels being passed down to the
created resources and thus being usable by KubeVirt end users.

[1] kubevirt/kubevirt#8480
[2] kubevirt/kubevirt#9040
[3] kubevirt/containerized-data-importer#2490
[4] kubevirt/containerized-data-importer#2534

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
  • Loading branch information
lyarwood authored Feb 28, 2023
1 parent 5c24b08 commit 2057518
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions assets/dataImportCronTemplates/dataImportCronTemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
annotations:
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
name: centos-stream8-image-cron
labels:
instancetype.kubevirt.io/default-preference: centos.8.stream
instancetype.kubevirt.io/default-instancetype: server.medium
spec:
schedule: "0 */12 * * *"
template:
Expand All @@ -19,6 +22,9 @@
annotations:
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
name: centos-stream9-image-cron
labels:
instancetype.kubevirt.io/default-preference: centos.9.stream
instancetype.kubevirt.io/default-instancetype: server.medium
spec:
schedule: "0 */12 * * *"
template:
Expand All @@ -36,6 +42,9 @@
annotations:
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
name: fedora-image-cron
labels:
instancetype.kubevirt.io/default-preference: fedora
instancetype.kubevirt.io/default-instancetype: server.medium
spec:
schedule: "0 */12 * * *"
template:
Expand All @@ -53,6 +62,9 @@
annotations:
cdi.kubevirt.io/storage.bind.immediate.requested: "true"
name: centos-7-image-cron
labels:
instancetype.kubevirt.io/default-preference: centos.7
instancetype.kubevirt.io/default-instancetype: server.medium
spec:
schedule: "0 */12 * * *"
template:
Expand Down

0 comments on commit 2057518

Please sign in to comment.