Skip to content

Commit

Permalink
chore: avoid to update persistent volume claim which is easy to lead …
Browse files Browse the repository at this point in the history
…a conflict

Signed-off-by: bjwswang <bjwswang@gmail.com>
  • Loading branch information
bjwswang committed Apr 11, 2024
1 parent c952db2 commit 4757ce4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,10 @@ func (podWorker *PodWorker) BeforeStart(ctx context.Context) error {
case Panic:
return err
case Update:
if err = podWorker.c.Update(ctx, pvc); err != nil {
return err
}
// DO NOT UPDATE PVC which is easily caused a conflict
// if err = podWorker.c.Update(ctx, pvc); err != nil {
// return err
// }
case Create:
err = podWorker.c.Create(ctx, pvc)
if err != nil {
Expand Down

0 comments on commit 4757ce4

Please sign in to comment.