Skip to content

Commit

Permalink
Workaround for client-go memory leak (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
jknipper authored Apr 15, 2024
1 parent b1d9181 commit 4db98d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/client/kubernetes/shared_client_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import (
"context"
"fmt"
"net"
"net/http"
"os"
"sync"
"time"

kitlog "github.com/go-kit/log"
machnet "k8s.io/apimachinery/pkg/util/net"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
Expand Down Expand Up @@ -92,6 +94,9 @@ func (f *sharedClientFactory) ConfigFor(k *kubernikus_v1.Kluster) (rest.Config,
CAData: []byte(secret.TLSCACertificate),
},
Dial: dialerFunc,
// https://github.com/kubernetes/kubernetes/issues/118703#issuecomment-1595072383
// TODO: Revert or adapt when upstream fix is available
Proxy: machnet.NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment),
}
return c, nil
}
Expand Down

0 comments on commit 4db98d6

Please sign in to comment.