azure: Fix NPE when exporting kubeconfig

This commit is contained in:
Ciprian Hacman 2022-11-08 16:23:09 +02:00
parent 582fe9ee36
commit 5ed728b805
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ func (c *azureCloudImplementation) GetApiIngressStatus(cluster *kops.Cluster) ([
return nil, fmt.Errorf("error getting Master Scale Set Network Interfaces for API Ingress Status: %s", err)
}
for _, ni := range nis {
if !*ni.Primary {
if ni.Primary == nil || !*ni.Primary {
continue
}
for _, i := range *ni.IPConfigurations {