Skip to content

Commit

Permalink
Addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed Feb 9, 2024
1 parent 7f9e2fd commit 8511046
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/update_pod_status_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,18 +613,22 @@ func (initp *InitParams) manageVolumesAndUpdateStatus(ctx context.Context, resta
// Customize the error check for retrying, return true to retry, false to stop retrying
return true
}, func() error {
if err := initp.k8sClient.Get(ctx, podNamespacedName, pod); err != nil {
return err
}

// Patch the resource
if err := initp.k8sClient.Update(ctx, pod); err != nil {
return err
}

initp.logger.Info("Pod status patched successfully", "podname", initp.podName)
initp.logger.Info("Patched/updated pod annotation successfully", "podname", initp.podName)
return nil
}); err != nil {
return err
}

initp.logger.Info("Updating pod status", "podname", initp.podName)
initp.logger.Info("Updating pod status in CR", "podname", initp.podName)

return initp.updateStatus(ctx, metadata)
}
Expand Down

0 comments on commit 8511046

Please sign in to comment.