Skip to content

Commit

Permalink
fix: set boot source labels for DVs created by windows pipelines
Browse files Browse the repository at this point in the history
Set default instanceType and preferences labels to result DVs created
by windows pipelines. With this fix, DVs will have default preferences
when user triggers pipeline. Default values will be taken from already
existing parameters instanceTypeName, instanceTypeKind, preferenceName,
virtualMachinePreferenceKind

Signed-off-by: Karel Simon <ksimon@redhat.com>
  • Loading branch information
ksimon1 committed Jan 24, 2024
1 parent 3c7c91d commit 1894c31
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions data/tekton-pipelines/windows-bios-installer-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ spec:
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
labels:
"instancetype.kubevirt.io/default-instancetype-kind": $(params.instanceTypeKind)
"instancetype.kubevirt.io/default-instancetype": $(params.instanceTypeName)
"instancetype.kubevirt.io/default-preference-kind": $(params.virtualMachinePreferenceKind)
"instancetype.kubevirt.io/default-preference": $(params.preferenceName)
name: $(params.baseDvName)
namespace: $(params.baseDvNamespace)
spec:
Expand Down
5 changes: 5 additions & 0 deletions data/tekton-pipelines/windows-efi-installer-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ spec:
metadata:
annotations:
"cdi.kubevirt.io/storage.bind.immediate.requested": "true"
labels:
"instancetype.kubevirt.io/default-instancetype-kind": $(params.instanceTypeKind)
"instancetype.kubevirt.io/default-instancetype": $(params.instanceTypeName)
"instancetype.kubevirt.io/default-preference-kind": $(params.virtualMachinePreferenceKind)
"instancetype.kubevirt.io/default-preference": $(params.preferenceName)
name: $(params.baseDvName)
namespace: $(params.baseDvNamespace)
spec:
Expand Down

0 comments on commit 1894c31

Please sign in to comment.