We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72aaeba commit 3390881Copy full SHA for 3390881
1 file changed
pkg/controller/infrastructure/stackit/infraflow/reconcile.go
@@ -152,6 +152,20 @@ func (fctx *FlowContext) ensureOpenStackSubnetID(ctx context.Context) error {
152
)
153
}
154
155
+ if osNetwork == nil {
156
+ return gardenv1beta1helper.NewErrorWithCodes(
157
+ fmt.Errorf("network with ID '%s' was not found", networkID),
158
+ gardencorev1beta1.ErrorInfraDependencies,
159
+ )
160
+ }
161
+
162
+ if len(osNetwork.Subnets) == 0 {
163
164
+ fmt.Errorf("network with ID '%s' does not have any subnets", networkID),
165
166
167
168
169
// TODO: A network can have multiple subnets. Check if we can just fetch the first one
170
fctx.state.Set(IdentifierSubnet, osNetwork.Subnets[0])
171
return nil
0 commit comments