From b945a87aef0ab715c1eda1fec6ff5564509d1f69 Mon Sep 17 00:00:00 2001 From: Axel Siebenborn Date: Tue, 17 Dec 2024 15:23:24 +0100 Subject: [PATCH] Set IPv4 CIDR to empty string for IPv6 only shoots. --- pkg/controller/infrastructure/infraflow/reconcile.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/controller/infrastructure/infraflow/reconcile.go b/pkg/controller/infrastructure/infraflow/reconcile.go index 54835d2b3..df367551b 100644 --- a/pkg/controller/infrastructure/infraflow/reconcile.go +++ b/pkg/controller/infrastructure/infraflow/reconcile.go @@ -681,13 +681,17 @@ func (c *FlowContext) ensureZones(ctx context.Context) error { tagsPublic[TagKeyRolePublicELB] = TagValueELB tagsPrivate := c.commonTagsWithSuffix(helper.GetSuffixSubnetPrivate()) tagsPrivate[TagKeyRolePrivateELB] = TagValueELB + workersCIDR := zone.Workers + if !isIPv4(c.getIpFamilies()) { + workersCIDR = "" + } desired = append(desired, &awsclient.Subnet{ Tags: tagsWorkers, VpcId: c.state.Get(IdentifierVPC), AvailabilityZone: zone.Name, AssignIpv6AddressOnCreation: ptr.To(isIPv6(c.getIpFamilies())), - CidrBlock: zone.Workers, + CidrBlock: workersCIDR, Ipv6Native: ptr.To(!isIPv4(c.getIpFamilies())), EnableResourceNameDnsAAAARecordOnLaunch: ptr.To(!isIPv4(c.getIpFamilies())), EnableDns64: ptr.To(!isIPv4(c.getIpFamilies())),