Skip to content

Commit

Permalink
Fix other uses of NewForConfigOrDie in contexts where we could return…
Browse files Browse the repository at this point in the history
… err

Signed-off-by: Brad Davidson <[email protected]>
(cherry picked from commit 3da1bb3)
  • Loading branch information
brandond committed Oct 29, 2021
1 parent 950db69 commit 3d4a75b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/server/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 3d4a75b

Please sign in to comment.