From 2057518be194538fc110154fb5b8d6674bb54c61 Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Tue, 28 Feb 2023 13:56:51 +0000 Subject: [PATCH] dataImportCronTemplates: Add default instance type labels (#2202) 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] https://github.com/kubevirt/kubevirt/pull/8480 [2] https://github.com/kubevirt/kubevirt/pull/9040 [3] https://github.com/kubevirt/containerized-data-importer/pull/2490 [4] https://github.com/kubevirt/containerized-data-importer/pull/2534 Signed-off-by: Lee Yarwood --- .../dataImportCronTemplates.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/assets/dataImportCronTemplates/dataImportCronTemplates.yaml b/assets/dataImportCronTemplates/dataImportCronTemplates.yaml index 579ede2dab..8e81ab2da7 100644 --- a/assets/dataImportCronTemplates/dataImportCronTemplates.yaml +++ b/assets/dataImportCronTemplates/dataImportCronTemplates.yaml @@ -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: @@ -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: @@ -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: @@ -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: