Skip to content

Commit

Permalink
investigating memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
enekofb committed Sep 1, 2023
1 parent 17e51da commit 34f63f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/clustersmngr/cluster/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ package cluster
import (
"fmt"
"net"
"net/http"

"github.com/weaveworks/weave-gitops/pkg/kube"
"github.com/weaveworks/weave-gitops/pkg/server/auth"
apiruntime "k8s.io/apimachinery/pkg/runtime"
machnet "k8s.io/apimachinery/pkg/util/net"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -60,6 +62,11 @@ func getClientFromConfig(config *rest.Config, scheme *apiruntime.Scheme) (client
return nil, fmt.Errorf("could not create RESTMapper from config: %w", err)
}

// From https://github.com/weaveworks/weave-gitops-enterprise/issues/3189
// Suggested in https://github.com/kubernetes/kubernetes/issues/118703#issuecomment-1595072383
// TODO: Revert or adapt when upstream fix is available
config.Proxy = machnet.NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment)

client, err := client.New(config, client.Options{
Scheme: scheme,
Mapper: mapper,
Expand Down

0 comments on commit 34f63f9

Please sign in to comment.