Skip to content

Commit

Permalink
fix: create snapshot failed if the k8s not support v1 api
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei committed Oct 25, 2023
1 parent 0470c13 commit 1b4c452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/dataprotection/action/action_create_vs.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (c *CreateVolumeSnapshotAction) createVolumeSnapshotIfNotExist(ctx Context,

msg := fmt.Sprintf("creating volume snapshot %s/%s", snap.Namespace, snap.Name)
ctx.Recorder.Event(c.Owner, corev1.EventTypeNormal, "CreatingVolumeSnapshot", msg)
if err = ctx.Client.Create(ctx.Ctx, snap); err != nil {
if err = vsCli.Create(snap); err != nil {
return err
}
return nil
Expand Down

0 comments on commit 1b4c452

Please sign in to comment.