diff --git a/pkg/exposer/csi_snapshot.go b/pkg/exposer/csi_snapshot.go index d20638d7a..6127260c6 100644 --- a/pkg/exposer/csi_snapshot.go +++ b/pkg/exposer/csi_snapshot.go @@ -259,7 +259,13 @@ func (e *csiSnapshotExposer) Expose(ctx context.Context, ownerObject corev1api.O return errors.Wrap(err, "error to create backup pod") } - curLog.WithField("pod name", backupPod.Name).WithField("affinity", csiExposeParam.Affinity).Info("Backup pod is created") + curLog = curLog.WithField("pod name", backupPod.Name) + if affinity != nil { + curLog = curLog.WithField("affinity", *affinity) + } else { + curLog = curLog.WithField("affinity", "nil") + } + curLog.Info("Backup pod is created") defer func() { if err != nil {