Skip to content

Commit 60dae41

Browse files
Postpone targetgroup/target reconcile during HTTPRoute delete (#83)
1 parent 0f62729 commit 60dae41

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/gateway/model_build_lattice_service.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ func (t *latticeServiceModelBuildTask) buildModel(ctx context.Context) error {
7575
return err
7676
}
7777

78+
if !t.httpRoute.DeletionTimestamp.IsZero() {
79+
// in case of deleting HTTPRoute, we will let reconcile logic to delete
80+
// stated target group(s) at next reconcile interval
81+
glog.V(6).Infof("latticeServiceModuleBuildTask: for HTTPRouteDelete, reconcile tagetgroups/targets at reconcile interval")
82+
return nil
83+
}
84+
7885
_, err = t.buildTargetGroup(ctx, t.Client)
7986

8087
if err != nil {

0 commit comments

Comments
 (0)