Skip to content

Commit

Permalink
Fix panic if "infrastructureConfig" contains no "networks" entry
Browse files Browse the repository at this point in the history
  • Loading branch information
NotTheEvilOne committed Feb 14, 2022
1 parent 0e7faa2 commit ca3ce10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/infrastructure/ensurer/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func EnsureNetworks(ctx context.Context, client *ionossdk.APIClient, datacenterI
resultData.WANID = wanID
}

if "" != networks.Workers {
if nil != networks && "" != networks.Workers {
name = fmt.Sprintf("%s-workers", namespace)

for _, lan := range *lans.Items {
Expand Down

0 comments on commit ca3ce10

Please sign in to comment.