Skip to content

Commit

Permalink
fix(application): health check use informer get app (#1764)
Browse files Browse the repository at this point in the history
Co-authored-by: xdonggao <[email protected]>
  • Loading branch information
GaoXiaodong and xdonggao authored Feb 9, 2022
1 parent ea1d1d0 commit 2419eb3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/application/controller/app/app_health.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"time"

"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/tools/cache"
Expand Down Expand Up @@ -85,7 +84,7 @@ func (c *Controller) watchAppHealth(ctx context.Context, key string) func() (boo
return true, nil
}

app, err := c.client.ApplicationV1().Apps(namespace).Get(ctx, name, metav1.GetOptions{})
app, err := c.lister.Apps(namespace).Get(name)
if err != nil && errors.IsNotFound(err) {
log.Error("App not found, to exit the health check loop",
log.String("name", name))
Expand Down

0 comments on commit 2419eb3

Please sign in to comment.