Skip to content

Commit

Permalink
Avoid throwing on PodGroup deletion when NotFound (#217)
Browse files Browse the repository at this point in the history
This will most likely mean that the PodGroup was deleted or it was never
created. In either case we don't want to fail the reconcile loop.
  • Loading branch information
regadas authored Jan 21, 2022
1 parent e950848 commit df276b8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion controllers/flinkcluster/batchscheduler/volcano/volcano.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,12 @@ func (v *VolcanoBatchScheduler) deletePodGroup(cluster *v1beta1.FlinkCluster) er
func (v *VolcanoBatchScheduler) syncPodGroup(cluster *v1beta1.FlinkCluster, state *model.DesiredClusterState) (*scheduling.PodGroup, error) {
if state.JmStatefulSet == nil && state.TmStatefulSet == nil {
// remove the podgroup if the JobManager/TaskManager statefulset are not set
return nil, v.deletePodGroup(cluster)
err := v.deletePodGroup(cluster)
if !errors.IsNotFound(err) {
return nil, err
}

return nil, nil
}

minResource, size := getClusterResource(state)
Expand Down

0 comments on commit df276b8

Please sign in to comment.