Skip to content

Commit 8c9bad8

Browse files
committed
controlplane: return client error
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
1 parent b5fc001 commit 8c9bad8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/controlplane/apiserver/server.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ func (c completedConfig) New(name string, delegationTarget genericapiserver.Dele
133133
VersionedInformers: c.VersionedInformers,
134134
}
135135

136-
client := kubernetes.NewForConfigOrDie(s.GenericAPIServer.LoopbackClientConfig)
136+
client, err := kubernetes.NewForConfig(s.GenericAPIServer.LoopbackClientConfig)
137+
if err != nil {
138+
return nil, err
139+
}
137140
if len(c.SystemNamespaces) > 0 {
138141
s.GenericAPIServer.AddPostStartHookOrDie("start-system-namespaces-controller", func(hookContext genericapiserver.PostStartHookContext) error {
139142
go systemnamespaces.NewController(c.SystemNamespaces, client, s.VersionedInformers.Core().V1().Namespaces()).Run(hookContext.StopCh)

0 commit comments

Comments
 (0)