Skip to content

Commit

Permalink
Postpone targetgroup/target reconcile during HTTPRoute delete (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
liwenwu-amazon authored Feb 6, 2023
1 parent 0f62729 commit 60dae41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/gateway/model_build_lattice_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ func (t *latticeServiceModelBuildTask) buildModel(ctx context.Context) error {
return err
}

if !t.httpRoute.DeletionTimestamp.IsZero() {
// in case of deleting HTTPRoute, we will let reconcile logic to delete
// stated target group(s) at next reconcile interval
glog.V(6).Infof("latticeServiceModuleBuildTask: for HTTPRouteDelete, reconcile tagetgroups/targets at reconcile interval")
return nil
}

_, err = t.buildTargetGroup(ctx, t.Client)

if err != nil {
Expand Down

0 comments on commit 60dae41

Please sign in to comment.