From ca3ce10fb90d332b8b5d27b551ccb3c24978bc83 Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Mon, 14 Feb 2022 16:52:13 +0100 Subject: [PATCH] Fix panic if "infrastructureConfig" contains no "networks" entry --- pkg/controller/infrastructure/ensurer/networks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/infrastructure/ensurer/networks.go b/pkg/controller/infrastructure/ensurer/networks.go index 8f9a5892..3f60715b 100644 --- a/pkg/controller/infrastructure/ensurer/networks.go +++ b/pkg/controller/infrastructure/ensurer/networks.go @@ -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 {