Apply suggestion from @gemini-code-assist[bot]
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
(cherry picked from commit 09cd9e05c3)
This commit is contained in:
parent
eae630ffb5
commit
b8d32fb894
1 changed files with 3 additions and 2 deletions
|
|
@ -466,8 +466,9 @@ func (r *WorkloadMonitorReconciler) getWorkloadMetadata(obj client.Object) map[s
|
|||
annotations := obj.GetAnnotations()
|
||||
if instanceType, ok := annotations["kubevirt.io/cluster-instancetype-name"]; ok {
|
||||
labels["workloads.cozystack.io/kubevirt-vmi-instance-type"] = instanceType
|
||||
if instanceProfile, ok := annotations["kubevirt.io/cluster-preference-name"]; ok {
|
||||
labels["workloads.cozystack.io/kubevirt-vmi-instance-profile"] = instanceProfile
|
||||
}
|
||||
if instanceProfile, ok := annotations["kubevirt.io/cluster-instanceprofile-name"]; ok {
|
||||
labels["workloads.cozystack.io/kubevirt-vmi-instance-profile"] = instanceProfile
|
||||
}
|
||||
return labels
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue