mirror of https://github.com/k3s-io/k3s
Fix other uses of NewForConfigOrDie in contexts where we could return err
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 3da1bb3af2
)
pull/4375/head
parent
c73aaf839b
commit
4a9a216232
|
@ -59,7 +59,10 @@ func NewContext(ctx context.Context, cfg string) (*Context, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
k8s := kubernetes.NewForConfigOrDie(restConfig)
|
||||
k8s, err := kubernetes.NewForConfig(restConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &Context{
|
||||
K3s: k3s.NewFactoryFromConfigOrDie(restConfig),
|
||||
Helm: helm.NewFactoryFromConfigOrDie(restConfig),
|
||||
|
|
Loading…
Reference in New Issue