Skip to content

Commit

Permalink
Get the proper importer pods
Browse files Browse the repository at this point in the history
The importer pods name starts with `importer-<pvc name>`. This patch
will change the way we find the importer pods for a particular PVC name.

Signed-off-by: Liran Rotenberg <[email protected]>
  • Loading branch information
liranr23 committed Mar 28, 2024
1 parent 6dfe2e0 commit f30daee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/plan/kubevirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (r *KubeVirt) getImporterPods(pvc *core.PersistentVolumeClaim) (pods []core
return
}
for _, pod := range podList.Items {
if strings.Contains(pod.Name, fmt.Sprintf("importer-%s-%s", r.Plan.Name, pvc.Annotations[kVM])) {
if strings.Contains(pod.Name, fmt.Sprintf("importer-%s", pvc.Name)) {
pods = append(pods, pod)
}
}
Expand Down

0 comments on commit f30daee

Please sign in to comment.