Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,3 +582,18 @@ func (b *KVVM) GetBootloaderSettings() map[string]interface{} {
},
}
}

func (b *KVVM) SetMetadata(metadata metav1.ObjectMeta) {
if b.ResourceExists {
// initialize only
return
}
if b.Resource.Spec.Template.ObjectMeta.Labels == nil {
b.Resource.Spec.Template.ObjectMeta.Labels = make(map[string]string, len(metadata.Labels))
}
if b.Resource.Spec.Template.ObjectMeta.Annotations == nil {
b.Resource.Spec.Template.ObjectMeta.Annotations = make(map[string]string, len(metadata.Annotations))
}
maps.Copy(b.Resource.Spec.Template.ObjectMeta.Labels, metadata.Labels)
maps.Copy(b.Resource.Spec.Template.ObjectMeta.Annotations, metadata.Annotations)
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func ApplyVirtualMachineSpec(
return err
}

kvvm.SetMetadata(vm.ObjectMeta)
kvvm.SetNetworkInterface(NetworkInterfaceName)
kvvm.SetTablet("default-0")
kvvm.SetNodeSelector(vm.Spec.NodeSelector, class.Spec.NodeSelector.MatchLabels)
Expand Down
2 changes: 0 additions & 2 deletions tests/e2e/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ tasks:
cmds:
- |
RESULT=$(ginkgo \
--skip-file affinity_toleration_test.go \
--no-color \
-v | tee /dev/stderr | grep --color=never -E 'FAIL!|SUCCESS!')
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
Expand Down Expand Up @@ -106,7 +105,6 @@ tasks:
cmds:
- |
ginkgo -v \
--skip-file affinity_toleration_test.go \
{{if .FOCUS -}}
--focus "{{ .FOCUS }}"
{{end}}
Loading