Skip to content

Commit

Permalink
fix(env-check): delete testing pvc after checking the storage env
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfooI committed Apr 24, 2024
1 parent 4cfaf28 commit 7b96e7a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/resource/obcluster/obcluster_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,12 @@ func CheckEnvironment(m *OBClusterManager) tasktypes.TaskError {
if err != nil {
return errors.Wrap(err, "Create pvc for checking storage")
}
defer func() {
err = m.Client.Delete(m.Ctx, pvc)
if err != nil {
m.Logger.Info("Failed to delete pvc for checking storage")
}
}()
// Assemble volumeConfigs
volumeConfigs := resourceutils.JobContainerVolumes{
Volumes: []corev1.Volume{{
Expand Down

0 comments on commit 7b96e7a

Please sign in to comment.