@@ -45,11 +45,8 @@ func (fctx *FlowContext) Reconcile(ctx context.Context) error {
4545
4646 state := fctx .computeInfrastructureState ()
4747 status := fctx .computeInfrastructureStatus ()
48- nodeCIDR := fctx .state .Get (IdentifierNodeSubnetIPv6CIDR )
49- podCIDR := fctx .state .Get (IdentifierPodSubnetIPv6CIDR )
50- svcCIDR := fctx .state .Get (IdentifierServiceSubnetIPv6CIDR )
51- return PatchProviderStatusAndState (ctx , fctx .client , fctx .infra , fctx .shootNetworking , status , state , nodeCIDR , podCIDR , svcCIDR )
52- //return PatchProviderStatusAndState(ctx, fctx.client, fctx.infra, fctx.shootNetworking, status, state, nil, nil, nil)
48+ networkingStatus := fctx .computeInfrastructureNetworkingStatus ()
49+ return PatchProviderStatusAndState (ctx , fctx .client , fctx .infra , status , state , networkingStatus )
5350}
5451
5552func (fctx * FlowContext ) buildReconcileGraph () * flow.Graph {
@@ -79,20 +76,20 @@ func (fctx *FlowContext) buildReconcileGraph() *flow.Graph {
7976
8077 ensureSubnetIPv6 := fctx .AddTask (g , "ensure IPv6 subnet" ,
8178 fctx .ensureSubnetIPv6 ,
82- shared .Timeout (defaultTimeout ), shared .Dependencies (ensureNetwork ))
79+ shared .Timeout (defaultTimeout ), shared .Dependencies (ensureNetwork ), shared . DoIf ( gardencorev1beta1 . IsDualStack ( fctx . shootNetworking . IPFamilies )) )
8380
8481 _ = fctx .AddTask (g , "ensure router interface" ,
8582 fctx .ensureRouterInterface ,
8683 shared .Timeout (defaultTimeout ), shared .Dependencies (ensureRouter , ensureSubnet ))
8784
8885 _ = fctx .AddTask (g , "ensure IPv6 router interface" ,
8986 fctx .ensureRouterInterfaceIPv6 ,
90- shared .Timeout (defaultTimeout ), shared .Dependencies (ensureRouter , ensureSubnetIPv6 ))
87+ shared .Timeout (defaultTimeout ), shared .Dependencies (ensureRouter , ensureSubnetIPv6 ), shared . DoIf ( gardencorev1beta1 . IsDualStack ( fctx . shootNetworking . IPFamilies )) )
9188
9289 _ = fctx .AddTask (g , "ensure IPv6 CIDR services" , fctx .ensureIPv6CIDRs ,
9390 shared .Timeout (defaultTimeout ),
9491 shared .Dependencies (ensureSubnetIPv6 ),
95- shared .DoIf (fctx . isDualStack ( )),
92+ shared .DoIf (gardencorev1beta1 . IsDualStack ( fctx . shootNetworking . IPFamilies )),
9693 )
9794
9895 ensureSecGroup := fctx .AddTask (g , "ensure security group" ,
@@ -337,9 +334,6 @@ func (fctx *FlowContext) ensureSubnet(ctx context.Context) error {
337334func (fctx * FlowContext ) ensureSubnetIPv6 (ctx context.Context ) error {
338335 log := shared .LogFromContext (ctx )
339336
340- if ! fctx .isDualStack () {
341- return nil
342- }
343337 if fctx .state .Get (IdentifierNetwork ) == nil {
344338 return fmt .Errorf ("missing cluster network ID" )
345339 }
@@ -415,10 +409,6 @@ func (fctx *FlowContext) ensureSubnetIPv6(ctx context.Context) error {
415409func (fctx * FlowContext ) ensureIPv6CIDRs (ctx context.Context ) error {
416410 log := shared .LogFromContext (ctx )
417411
418- if ! fctx .isDualStack () {
419- return nil
420- }
421-
422412 // If explicit IPv6 CIDRs are configured, use them directly
423413 if fctx .hasExplicitIPv6Config () {
424414 nodeCIDR := fctx .config .Networks .IPv6 .NodeCIDR
@@ -559,9 +549,6 @@ func (fctx *FlowContext) ensureRouterInterface(ctx context.Context) error {
559549
560550func (fctx * FlowContext ) ensureRouterInterfaceIPv6 (ctx context.Context ) error {
561551 log := shared .LogFromContext (ctx )
562- if ! fctx .isDualStack () {
563- return nil
564- }
565552 routerID := fctx .state .Get (IdentifierRouter )
566553 if routerID == nil {
567554 return fmt .Errorf ("internal error: missing routerID" )
@@ -660,7 +647,7 @@ func (fctx *FlowContext) ensureSecGroupRules(ctx context.Context) error {
660647 },
661648 }
662649
663- if fctx . isDualStack ( ) {
650+ if gardencorev1beta1 . IsDualStack ( fctx . shootNetworking . IPFamilies ) {
664651 desiredRules = append (desiredRules , []rules.SecGroupRule {
665652 {
666653 Direction : string (rules .DirIngress ),
0 commit comments