Skip to content

Commit 52d2826

Browse files
committed
make ToRESTConfig for creating a kubernetes client outside pkg/kubernetes
Signed-off-by: Harshal Patil <[email protected]>
1 parent 99e9543 commit 52d2826

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/kubernetes/kubernetes.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ type Kubernetes struct {
4141
manager *Manager
4242
}
4343

44+
// ToRESTConfig returns the rest.Config for creating custom clients
45+
func (k *Kubernetes) ToRESTConfig() (*rest.Config, error) {
46+
return k.manager.ToRESTConfig()
47+
}
48+
4449
type Manager struct {
4550
cfg *rest.Config
4651
clientCmdConfig clientcmd.ClientConfig

0 commit comments

Comments
 (0)