Skip to content

Commit

Permalink
prevent nil pointer dereference on renaming attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
grs committed Mar 11, 2021
1 parent 992de5d commit 3981b08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/router_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ func (cli *VanClient) RouterUpdateVersionInNamespace(ctx context.Context, hup bo
if err != nil && !errors.IsAlreadyExists(err) {
return false, err
}
consoleUsesLoadbalancer = controllerSvc.Spec.Type == corev1.ServiceTypeLoadBalancer
if controllerSvc != nil {
consoleUsesLoadbalancer = controllerSvc.Spec.Type == corev1.ServiceTypeLoadBalancer
}
//update annotation on skupper-router-console if it exists
routerConsoleService, err := cli.KubeClient.CoreV1().Services(namespace).Get(types.RouterConsoleServiceName, metav1.GetOptions{})
if err == nil {
Expand Down

0 comments on commit 3981b08

Please sign in to comment.