Skip to content

Commit

Permalink
[oadp-1.2] OADP-2047: Make data mover dummy pod configurable (#229)
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
Co-authored-by: Jason Montleon <jmontleo@redhat.com>
  • Loading branch information
openshift-cherrypick-robot and jmontleon committed Jun 2, 2023
1 parent 7b18a3b commit 79119cd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion controllers/pvc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"os"

k8serrors "k8s.io/apimachinery/pkg/api/errors"

Expand Down Expand Up @@ -187,7 +188,7 @@ func (r *VolumeSnapshotBackupReconciler) BindPVCToDummyPod(log logr.Logger) (boo
Containers: []corev1.Container{
{
Name: "busybox",
Image: DummyPodImage,
Image: getDataMoverDummyPodImage(),
Command: []string{
"/bin/sh", "-c", "tail -f /dev/null",
},
Expand Down Expand Up @@ -341,3 +342,10 @@ func (r *VolumeSnapshotBackupReconciler) IsPVCBound(log logr.Logger) (bool, erro
return true, nil

}

func getDataMoverDummyPodImage() string {
if os.Getenv("DATA_MOVER_DUMMY_POD_IMAGE") == "" {
return DummyPodImage
}
return os.Getenv("DATA_MOVER_DUMMY_POD_IMAGE")
}

0 comments on commit 79119cd

Please sign in to comment.