k8s.io/client-go
Go client for Kubernetes.
Update config from k8s.io/client-go/rest.Config struct literal.
Struct literal
k8s.io/client-go/rest.Config
Replace the expression using the template:
// Using the following synthetic imports:
import (
kubernetestrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/k8s.io/client-go/kubernetes"
kubernetestransport "k8s.io/client-go/transport"
)
{{- .AST.Type -}}{
{{- $hasField := false -}}
{{ range .AST.Elts }}
{{- if eq .Key.Name "WrapTransport" }}
{{- $hasField = true -}}
WrapTransport: kubernetestransport.Wrappers({{ .Value }}, kubernetestrace.WrapRoundTripper),
{{- else -}}
{{ . }},
{{ end -}}
{{ end }}
{{- if not $hasField -}}
WrapTransport: kubernetestransport.Wrappers(nil, kubernetestrace.WrapRoundTripper),
{{- end }}
}