Skip to content

Commit

Permalink
fix: k8s client need TLS config provided by the underlying transport (#…
Browse files Browse the repository at this point in the history
…930)

Co-authored-by: David Ragot <[email protected]>
  • Loading branch information
Dav-14 and David Ragot authored Nov 29, 2023
1 parent 809798c commit 8073af7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/agent/internal/k8s/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ func newClient(config *rest.Config) (*clientv1beta3.Client, error) {
if crdConfig.UserAgent == "" {
crdConfig.UserAgent = rest.DefaultKubernetesUserAgent()
}
crdConfig.Transport = otlp.NewRoundTripper(http.DefaultTransport, false)

config.Wrap(func(rt http.RoundTripper) http.RoundTripper {
return otlp.NewRoundTripper(rt, false)
})

client, err := rest.RESTClientFor(&crdConfig)
if err != nil {
Expand Down

1 comment on commit 8073af7

@vercel
Copy link

@vercel vercel bot commented on 8073af7 Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.