From 800583f5fa20c4ff68d66be9eb71665b1c8c4d6f Mon Sep 17 00:00:00 2001 From: Marco Braga Date: Thu, 25 Apr 2024 01:36:18 -0300 Subject: [PATCH 1/3] data/cluster-api/aws: update CRD with Wavelength support --- .../aws-infrastructure-components.yaml | 92 +++++++++++++++---- 1 file changed, 72 insertions(+), 20 deletions(-) diff --git a/data/data/cluster-api/aws-infrastructure-components.yaml b/data/data/cluster-api/aws-infrastructure-components.yaml index 3ea39073593..c04eb697f69 100644 --- a/data/data/cluster-api/aws-infrastructure-components.yaml +++ b/data/data/cluster-api/aws-infrastructure-components.yaml @@ -2061,8 +2061,8 @@ spec: the zone is a Local Zone. - The subnets in Local Zone locations consume the ParentZoneName to determine the correct - private route table to egress traffic to the internet. + The subnets in Local Zone or Wavelength Zone locations consume the ParentZoneName + to select the correct private route table to egress traffic to the internet. type: string resourceID: description: |- @@ -2084,14 +2084,14 @@ spec: ZoneType defines the type of the zone where the subnet is created. - The valid values are availability-zone, and local-zone. + The valid values are availability-zone, local-zone, and wavelength-zone. Subnet with zone type availability-zone (regular) is always selected to create cluster resources, like Load Balancers, NAT Gateways, Contol Plane nodes, etc. - Subnet with zone type local-zone is not eligible to automatically create + Subnet with zone type local-zone or wavelength-zone is not eligible to automatically create regular cluster resources. @@ -2099,16 +2099,21 @@ spec: route table with default route entry to a Internet Gateway. + The public subnet in wavelength-zone is associated with a carrier public + route table with default route entry to a Carrier Gateway. + + The private subnet in the availability-zone is associated with a private route table with the default route entry to a NAT Gateway created in that zone. - The private subnet in the local-zone is associated with a private route table with + The private subnet in the local-zone or wavelength-zone is associated with a private route table with the default route entry re-using the NAT Gateway in the Region (preferred from the parent zone, the zone type availability-zone in the region, or first table available). enum: - availability-zone - local-zone + - wavelength-zone type: string required: - id @@ -2141,6 +2146,14 @@ spec: default subnets. Defaults to 3 minimum: 1 type: integer + carrierGatewayId: + description: |- + CarrierGatewayID is the id of the internet gateway associated with the VPC, + for carrier network (Wavelength Zones). + type: string + x-kubernetes-validations: + - message: Carrier Gateway ID must start with 'cagw-' + rule: self.startsWith('cagw-') cidrBlock: description: |- CidrBlock is the CIDR block to be used when the provider creates a managed VPC. @@ -4808,8 +4821,8 @@ spec: the zone is a Local Zone. - The subnets in Local Zone locations consume the ParentZoneName to determine the correct - private route table to egress traffic to the internet. + The subnets in Local Zone or Wavelength Zone locations consume the ParentZoneName + to select the correct private route table to egress traffic to the internet. type: string resourceID: description: |- @@ -4831,14 +4844,14 @@ spec: ZoneType defines the type of the zone where the subnet is created. - The valid values are availability-zone, and local-zone. + The valid values are availability-zone, local-zone, and wavelength-zone. Subnet with zone type availability-zone (regular) is always selected to create cluster resources, like Load Balancers, NAT Gateways, Contol Plane nodes, etc. - Subnet with zone type local-zone is not eligible to automatically create + Subnet with zone type local-zone or wavelength-zone is not eligible to automatically create regular cluster resources. @@ -4846,16 +4859,21 @@ spec: route table with default route entry to a Internet Gateway. + The public subnet in wavelength-zone is associated with a carrier public + route table with default route entry to a Carrier Gateway. + + The private subnet in the availability-zone is associated with a private route table with the default route entry to a NAT Gateway created in that zone. - The private subnet in the local-zone is associated with a private route table with + The private subnet in the local-zone or wavelength-zone is associated with a private route table with the default route entry re-using the NAT Gateway in the Region (preferred from the parent zone, the zone type availability-zone in the region, or first table available). enum: - availability-zone - local-zone + - wavelength-zone type: string required: - id @@ -4888,6 +4906,14 @@ spec: default subnets. Defaults to 3 minimum: 1 type: integer + carrierGatewayId: + description: |- + CarrierGatewayID is the id of the internet gateway associated with the VPC, + for carrier network (Wavelength Zones). + type: string + x-kubernetes-validations: + - message: Carrier Gateway ID must start with 'cagw-' + rule: self.startsWith('cagw-') cidrBlock: description: |- CidrBlock is the CIDR block to be used when the provider creates a managed VPC. @@ -9823,8 +9849,8 @@ spec: the zone is a Local Zone. - The subnets in Local Zone locations consume the ParentZoneName to determine the correct - private route table to egress traffic to the internet. + The subnets in Local Zone or Wavelength Zone locations consume the ParentZoneName + to select the correct private route table to egress traffic to the internet. type: string resourceID: description: |- @@ -9846,14 +9872,14 @@ spec: ZoneType defines the type of the zone where the subnet is created. - The valid values are availability-zone, and local-zone. + The valid values are availability-zone, local-zone, and wavelength-zone. Subnet with zone type availability-zone (regular) is always selected to create cluster resources, like Load Balancers, NAT Gateways, Contol Plane nodes, etc. - Subnet with zone type local-zone is not eligible to automatically create + Subnet with zone type local-zone or wavelength-zone is not eligible to automatically create regular cluster resources. @@ -9861,16 +9887,21 @@ spec: route table with default route entry to a Internet Gateway. + The public subnet in wavelength-zone is associated with a carrier public + route table with default route entry to a Carrier Gateway. + + The private subnet in the availability-zone is associated with a private route table with the default route entry to a NAT Gateway created in that zone. - The private subnet in the local-zone is associated with a private route table with + The private subnet in the local-zone or wavelength-zone is associated with a private route table with the default route entry re-using the NAT Gateway in the Region (preferred from the parent zone, the zone type availability-zone in the region, or first table available). enum: - availability-zone - local-zone + - wavelength-zone type: string required: - id @@ -9903,6 +9934,14 @@ spec: default subnets. Defaults to 3 minimum: 1 type: integer + carrierGatewayId: + description: |- + CarrierGatewayID is the id of the internet gateway associated with the VPC, + for carrier network (Wavelength Zones). + type: string + x-kubernetes-validations: + - message: Carrier Gateway ID must start with 'cagw-' + rule: self.startsWith('cagw-') cidrBlock: description: |- CidrBlock is the CIDR block to be used when the provider creates a managed VPC. @@ -11760,8 +11799,8 @@ spec: the zone is a Local Zone. - The subnets in Local Zone locations consume the ParentZoneName to determine the correct - private route table to egress traffic to the internet. + The subnets in Local Zone or Wavelength Zone locations consume the ParentZoneName + to select the correct private route table to egress traffic to the internet. type: string resourceID: description: |- @@ -11783,14 +11822,14 @@ spec: ZoneType defines the type of the zone where the subnet is created. - The valid values are availability-zone, and local-zone. + The valid values are availability-zone, local-zone, and wavelength-zone. Subnet with zone type availability-zone (regular) is always selected to create cluster resources, like Load Balancers, NAT Gateways, Contol Plane nodes, etc. - Subnet with zone type local-zone is not eligible to automatically create + Subnet with zone type local-zone or wavelength-zone is not eligible to automatically create regular cluster resources. @@ -11798,16 +11837,21 @@ spec: route table with default route entry to a Internet Gateway. + The public subnet in wavelength-zone is associated with a carrier public + route table with default route entry to a Carrier Gateway. + + The private subnet in the availability-zone is associated with a private route table with the default route entry to a NAT Gateway created in that zone. - The private subnet in the local-zone is associated with a private route table with + The private subnet in the local-zone or wavelength-zone is associated with a private route table with the default route entry re-using the NAT Gateway in the Region (preferred from the parent zone, the zone type availability-zone in the region, or first table available). enum: - availability-zone - local-zone + - wavelength-zone type: string required: - id @@ -11840,6 +11884,14 @@ spec: default subnets. Defaults to 3 minimum: 1 type: integer + carrierGatewayId: + description: |- + CarrierGatewayID is the id of the internet gateway associated with the VPC, + for carrier network (Wavelength Zones). + type: string + x-kubernetes-validations: + - message: Carrier Gateway ID must start with 'cagw-' + rule: self.startsWith('cagw-') cidrBlock: description: |- CidrBlock is the CIDR block to be used when the provider creates a managed VPC. From b5a18a00e7d4d76604a4a08a3a78065c29bde83f Mon Sep 17 00:00:00 2001 From: Marco Braga Date: Fri, 26 Apr 2024 14:06:31 -0300 Subject: [PATCH 2/3] vendor: bump CAPA for AWS Wavelength support Bump cluster-api-provider-aws with support of AWS Wavelength Zones introduced in the PR 4901. The bump points to commit on branch main/ac4958082eab59edb4af74e0b7f72eef213ed7ce --- cluster-api/providers/aws/vendor/modules.txt | 2 +- .../v2/api/v1beta1/awscluster_conversion.go | 1 + .../v2/api/v1beta1/zz_generated.conversion.go | 1 + .../v2/api/v1beta2/conditions_consts.go | 8 + .../v2/api/v1beta2/network_types.go | 69 +++++++-- .../v2/api/v1beta2/zz_generated.deepcopy.go | 5 + .../v2/pkg/cloud/awserrors/errors.go | 1 + .../cloud/services/network/carriergateways.go | 145 ++++++++++++++++++ .../v2/pkg/cloud/services/network/network.go | 15 ++ .../pkg/cloud/services/network/routetables.go | 15 ++ .../v2/pkg/cloud/services/network/subnets.go | 12 +- vendor/modules.txt | 2 +- .../v2/api/v1beta1/awscluster_conversion.go | 1 + .../v2/api/v1beta1/zz_generated.conversion.go | 1 + .../v2/api/v1beta2/conditions_consts.go | 8 + .../v2/api/v1beta2/network_types.go | 69 +++++++-- .../v2/api/v1beta2/zz_generated.deepcopy.go | 5 + 17 files changed, 337 insertions(+), 23 deletions(-) create mode 100644 cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/carriergateways.go diff --git a/cluster-api/providers/aws/vendor/modules.txt b/cluster-api/providers/aws/vendor/modules.txt index bd5c5bfca81..1245e37ac7e 100644 --- a/cluster-api/providers/aws/vendor/modules.txt +++ b/cluster-api/providers/aws/vendor/modules.txt @@ -1150,7 +1150,7 @@ sigs.k8s.io/cluster-api/util/predicates sigs.k8s.io/cluster-api/util/secret sigs.k8s.io/cluster-api/util/topology sigs.k8s.io/cluster-api/version -# sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240424180139-4c5b811deab4 +# sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240426161541-ac4958082eab ## explicit; go 1.21 sigs.k8s.io/cluster-api-provider-aws/v2 sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1 diff --git a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go index 5a802ff2c7b..382a4cd4d36 100644 --- a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go +++ b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go @@ -103,6 +103,7 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error { dst.Spec.NetworkSpec.VPC.EmptyRoutesDefaultVPCSecurityGroup = restored.Spec.NetworkSpec.VPC.EmptyRoutesDefaultVPCSecurityGroup dst.Spec.NetworkSpec.VPC.PrivateDNSHostnameTypeOnLaunch = restored.Spec.NetworkSpec.VPC.PrivateDNSHostnameTypeOnLaunch + dst.Spec.NetworkSpec.VPC.CarrierGatewayID = restored.Spec.NetworkSpec.VPC.CarrierGatewayID // Restore SubnetSpec.ResourceID, SubnetSpec.ParentZoneName, and SubnetSpec.ZoneType fields, if any. for _, subnet := range restored.Spec.NetworkSpec.Subnets { diff --git a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go index b6b6f29b047..10842bb9ae4 100644 --- a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go +++ b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go @@ -2307,6 +2307,7 @@ func autoConvert_v1beta2_VPCSpec_To_v1beta1_VPCSpec(in *v1beta2.VPCSpec, out *VP out.IPv6 = nil } out.InternetGatewayID = (*string)(unsafe.Pointer(in.InternetGatewayID)) + // WARNING: in.CarrierGatewayID requires manual conversion: does not exist in peer-type out.Tags = *(*Tags)(unsafe.Pointer(&in.Tags)) out.AvailabilityZoneUsageLimit = (*int)(unsafe.Pointer(in.AvailabilityZoneUsageLimit)) out.AvailabilityZoneSelection = (*AZSelectionScheme)(unsafe.Pointer(in.AvailabilityZoneSelection)) diff --git a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/conditions_consts.go b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/conditions_consts.go index bfbb96c77a6..604ef8e1d5a 100644 --- a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/conditions_consts.go +++ b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/conditions_consts.go @@ -69,6 +69,14 @@ const ( EgressOnlyInternetGatewayFailedReason = "EgressOnlyInternetGatewayFailed" ) +const ( + // CarrierGatewayReadyCondition reports on the successful reconciliation of carrier gateways. + // Only applicable to managed clusters. + CarrierGatewayReadyCondition clusterv1.ConditionType = "CarrierGatewayReady" + // CarrierGatewayFailedReason used when errors occur during carrier gateway reconciliation. + CarrierGatewayFailedReason = "CarrierGatewayFailed" +) + const ( // NatGatewaysReadyCondition reports successful reconciliation of NAT gateways. // Only applicable to managed clusters. diff --git a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go index c33e789a777..cd3042b717b 100644 --- a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go +++ b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go @@ -46,6 +46,8 @@ const ( ZoneTypeAvailabilityZone ZoneType = "availability-zone" // ZoneTypeLocalZone defines the AWS zone type in Local Zone infrastructure. ZoneTypeLocalZone ZoneType = "local-zone" + // ZoneTypeWavelengthZone defines the AWS zone type in Wavelength infrastructure. + ZoneTypeWavelengthZone ZoneType = "wavelength-zone" ) // NetworkStatus encapsulates AWS networking resources. @@ -409,6 +411,12 @@ type VPCSpec struct { // +optional InternetGatewayID *string `json:"internetGatewayId,omitempty"` + // CarrierGatewayID is the id of the internet gateway associated with the VPC, + // for carrier network (Wavelength Zones). + // +optional + // +kubebuilder:validation:XValidation:rule="self.startsWith('cagw-')",message="Carrier Gateway ID must start with 'cagw-'" + CarrierGatewayID *string `json:"carrierGatewayId,omitempty"` + // Tags is a collection of tags describing the resource. Tags Tags `json:"tags,omitempty"` @@ -521,33 +529,36 @@ type SubnetSpec struct { // ZoneType defines the type of the zone where the subnet is created. // - // The valid values are availability-zone, and local-zone. + // The valid values are availability-zone, local-zone, and wavelength-zone. // // Subnet with zone type availability-zone (regular) is always selected to create cluster // resources, like Load Balancers, NAT Gateways, Contol Plane nodes, etc. // - // Subnet with zone type local-zone is not eligible to automatically create + // Subnet with zone type local-zone or wavelength-zone is not eligible to automatically create // regular cluster resources. // // The public subnet in availability-zone or local-zone is associated with regular public // route table with default route entry to a Internet Gateway. // + // The public subnet in wavelength-zone is associated with a carrier public + // route table with default route entry to a Carrier Gateway. + // // The private subnet in the availability-zone is associated with a private route table with // the default route entry to a NAT Gateway created in that zone. // - // The private subnet in the local-zone is associated with a private route table with + // The private subnet in the local-zone or wavelength-zone is associated with a private route table with // the default route entry re-using the NAT Gateway in the Region (preferred from the // parent zone, the zone type availability-zone in the region, or first table available). // - // +kubebuilder:validation:Enum=availability-zone;local-zone + // +kubebuilder:validation:Enum=availability-zone;local-zone;wavelength-zone // +optional ZoneType *ZoneType `json:"zoneType,omitempty"` // ParentZoneName is the zone name where the current subnet's zone is tied when // the zone is a Local Zone. // - // The subnets in Local Zone locations consume the ParentZoneName to determine the correct - // private route table to egress traffic to the internet. + // The subnets in Local Zone or Wavelength Zone locations consume the ParentZoneName + // to select the correct private route table to egress traffic to the internet. // // +optional ParentZoneName *string `json:"parentZoneName,omitempty"` @@ -570,7 +581,27 @@ func (s *SubnetSpec) String() string { // IsEdge returns the true when the subnet is created in the edge zone, // Local Zones. func (s *SubnetSpec) IsEdge() bool { - return s.ZoneType != nil && *s.ZoneType == ZoneTypeLocalZone + if s.ZoneType == nil { + return false + } + if s.ZoneType.Equal(ZoneTypeLocalZone) { + return true + } + if s.ZoneType.Equal(ZoneTypeWavelengthZone) { + return true + } + return false +} + +// IsEdgeWavelength returns true only when the subnet is created in Wavelength Zone. +func (s *SubnetSpec) IsEdgeWavelength() bool { + if s.ZoneType == nil { + return false + } + if *s.ZoneType == ZoneTypeWavelengthZone { + return true + } + return false } // SetZoneInfo updates the subnets with zone information. @@ -681,7 +712,7 @@ func (s Subnets) FilterPrivate() (res Subnets) { res = append(res, x) } } - return res + return } // FilterPublic returns a slice containing all subnets marked as public. @@ -695,7 +726,7 @@ func (s Subnets) FilterPublic() (res Subnets) { res = append(res, x) } } - return res + return } // FilterByZone returns a slice containing all subnets that live in the availability zone specified. @@ -705,7 +736,7 @@ func (s Subnets) FilterByZone(zone string) (res Subnets) { res = append(res, x) } } - return res + return } // GetUniqueZones returns a slice containing the unique zones of the subnets. @@ -731,6 +762,19 @@ func (s Subnets) SetZoneInfo(zones []*ec2.AvailabilityZone) error { return nil } +// HasPublicSubnetWavelength returns true when there are subnets in Wavelength zone. +func (s Subnets) HasPublicSubnetWavelength() bool { + for _, sub := range s { + if sub.ZoneType == nil { + return false + } + if sub.IsPublic && *sub.ZoneType == ZoneTypeWavelengthZone { + return true + } + } + return false +} + // CNISpec defines configuration for CNI. type CNISpec struct { // CNIIngressRules specify rules to apply to control plane and worker node security groups. @@ -953,3 +997,8 @@ type ZoneType string func (z ZoneType) String() string { return string(z) } + +// Equal compares two zone types. +func (z ZoneType) Equal(other ZoneType) bool { + return z == other +} diff --git a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go index ea2b248a1cb..81b8a8d3148 100644 --- a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go +++ b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go @@ -2130,6 +2130,11 @@ func (in *VPCSpec) DeepCopyInto(out *VPCSpec) { *out = new(string) **out = **in } + if in.CarrierGatewayID != nil { + in, out := &in.CarrierGatewayID, &out.CarrierGatewayID + *out = new(string) + **out = **in + } if in.Tags != nil { in, out := &in.Tags, &out.Tags *out = make(Tags, len(*in)) diff --git a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/awserrors/errors.go b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/awserrors/errors.go index 5312e4fe42b..d51b41595c8 100644 --- a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/awserrors/errors.go +++ b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/awserrors/errors.go @@ -33,6 +33,7 @@ const ( GatewayNotFound = "InvalidGatewayID.NotFound" GroupNotFound = "InvalidGroup.NotFound" InternetGatewayNotFound = "InvalidInternetGatewayID.NotFound" + InvalidCarrierGatewayNotFound = "InvalidCarrierGatewayID.NotFound" EgressOnlyInternetGatewayNotFound = "InvalidEgressOnlyInternetGatewayID.NotFound" InUseIPAddress = "InvalidIPAddress.InUse" InvalidAccessKeyID = "InvalidAccessKeyId" diff --git a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/carriergateways.go b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/carriergateways.go new file mode 100644 index 00000000000..6237df9052c --- /dev/null +++ b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/carriergateways.go @@ -0,0 +1,145 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package network + +import ( + "context" + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/pkg/errors" + + infrav1 "sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2" + "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/awserrors" + "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/converters" + "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/filter" + "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services" + "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/wait" + "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/tags" + "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/record" + "sigs.k8s.io/cluster-api/util/conditions" +) + +func (s *Service) reconcileCarrierGateway() error { + if s.scope.VPC().IsUnmanaged(s.scope.Name()) { + s.scope.Trace("Skipping carrier gateway reconcile in unmanaged mode") + return nil + } + + if !s.scope.Subnets().HasPublicSubnetWavelength() { + s.scope.Trace("Skipping carrier gateway reconcile in VPC without subnets in zone type wavelength-zone") + return nil + } + + s.scope.Debug("Reconciling carrier gateway") + + cagw, err := s.describeVpcCarrierGateway() + if awserrors.IsNotFound(err) { + if s.scope.VPC().IsUnmanaged(s.scope.Name()) { + return errors.Errorf("failed to validate network: no carrier gateway found in VPC %q", s.scope.VPC().ID) + } + + cg, err := s.createCarrierGateway() + if err != nil { + return err + } + cagw = cg + } else if err != nil { + return err + } + + s.scope.VPC().CarrierGatewayID = cagw.CarrierGatewayId + + // Make sure tags are up-to-date. + if err := wait.WaitForWithRetryable(wait.NewBackoff(), func() (bool, error) { + buildParams := s.getGatewayTagParams(*cagw.CarrierGatewayId) + tagsBuilder := tags.New(&buildParams, tags.WithEC2(s.EC2Client)) + if err := tagsBuilder.Ensure(converters.TagsToMap(cagw.Tags)); err != nil { + return false, err + } + return true, nil + }, awserrors.InvalidCarrierGatewayNotFound); err != nil { + record.Warnf(s.scope.InfraCluster(), "FailedTagCarrierGateway", "Failed to tag managed Carrier Gateway %q: %v", cagw.CarrierGatewayId, err) + return errors.Wrapf(err, "failed to tag carrier gateway %q", *cagw.CarrierGatewayId) + } + conditions.MarkTrue(s.scope.InfraCluster(), infrav1.CarrierGatewayReadyCondition) + return nil +} + +func (s *Service) deleteCarrierGateway() error { + if s.scope.VPC().IsUnmanaged(s.scope.Name()) { + s.scope.Trace("Skipping carrier gateway deletion in unmanaged mode") + return nil + } + + cagw, err := s.describeVpcCarrierGateway() + if awserrors.IsNotFound(err) { + return nil + } else if err != nil { + return err + } + + deleteReq := &ec2.DeleteCarrierGatewayInput{ + CarrierGatewayId: cagw.CarrierGatewayId, + } + + if _, err = s.EC2Client.DeleteCarrierGatewayWithContext(context.TODO(), deleteReq); err != nil { + record.Warnf(s.scope.InfraCluster(), "FailedDeleteCarrierGateway", "Failed to delete Carrier Gateway %q previously attached to VPC %q: %v", *cagw.CarrierGatewayId, s.scope.VPC().ID, err) + return errors.Wrapf(err, "failed to delete carrier gateway %q", *cagw.CarrierGatewayId) + } + + record.Eventf(s.scope.InfraCluster(), "SuccessfulDeleteCarrierGateway", "Deleted Carrier Gateway %q previously attached to VPC %q", *cagw.CarrierGatewayId, s.scope.VPC().ID) + s.scope.Info("Deleted Carrier Gateway in VPC", "carrier-gateway-id", *cagw.CarrierGatewayId, "vpc-id", s.scope.VPC().ID) + + return nil +} + +func (s *Service) createCarrierGateway() (*ec2.CarrierGateway, error) { + ig, err := s.EC2Client.CreateCarrierGatewayWithContext(context.TODO(), &ec2.CreateCarrierGatewayInput{ + VpcId: aws.String(s.scope.VPC().ID), + TagSpecifications: []*ec2.TagSpecification{ + tags.BuildParamsToTagSpecification(ec2.ResourceTypeCarrierGateway, s.getGatewayTagParams(services.TemporaryResourceID)), + }, + }) + if err != nil { + record.Warnf(s.scope.InfraCluster(), "FailedCreateCarrierGateway", "Failed to create new managed Internet Gateway: %v", err) + return nil, errors.Wrap(err, "failed to create carrier gateway") + } + record.Eventf(s.scope.InfraCluster(), "SuccessfulCreateCarrierGateway", "Created new managed Internet Gateway %q", *ig.CarrierGateway.CarrierGatewayId) + s.scope.Info("Created Internet gateway for VPC", "internet-gateway-id", *ig.CarrierGateway.CarrierGatewayId, "vpc-id", s.scope.VPC().ID) + + return ig.CarrierGateway, nil +} + +func (s *Service) describeVpcCarrierGateway() (*ec2.CarrierGateway, error) { + out, err := s.EC2Client.DescribeCarrierGatewaysWithContext(context.TODO(), &ec2.DescribeCarrierGatewaysInput{ + Filters: []*ec2.Filter{ + filter.EC2.VPC(s.scope.VPC().ID), + }, + }) + if err != nil { + record.Eventf(s.scope.InfraCluster(), "FailedDescribeCarrierGateway", "Failed to describe carrier gateways in vpc %q: %v", s.scope.VPC().ID, err) + return nil, errors.Wrapf(err, "failed to describe carrier gateways in vpc %q", s.scope.VPC().ID) + } + + if len(out.CarrierGateways) == 0 { + return nil, awserrors.NewNotFound(fmt.Sprintf("no carrier gateways found in vpc %q", s.scope.VPC().ID)) + } + + return out.CarrierGateways[0], nil +} diff --git a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/network.go b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/network.go index b2363b5aac6..e97024fad7d 100644 --- a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/network.go +++ b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/network.go @@ -55,6 +55,12 @@ func (s *Service) ReconcileNetwork() (err error) { return err } + // Carrier Gateway. + if err := s.reconcileCarrierGateway(); err != nil { + conditions.MarkFalse(s.scope.InfraCluster(), infrav1.CarrierGatewayReadyCondition, infrav1.CarrierGatewayFailedReason, infrautilconditions.ErrorConditionAfterInit(s.scope.ClusterObj()), err.Error()) + return err + } + // Egress Only Internet Gateways. if err := s.reconcileEgressOnlyInternetGateways(); err != nil { conditions.MarkFalse(s.scope.InfraCluster(), infrav1.EgressOnlyInternetGatewayReadyCondition, infrav1.EgressOnlyInternetGatewayFailedReason, infrautilconditions.ErrorConditionAfterInit(s.scope.ClusterObj()), err.Error()) @@ -158,6 +164,15 @@ func (s *Service) DeleteNetwork() (err error) { } conditions.MarkFalse(s.scope.InfraCluster(), infrav1.InternetGatewayReadyCondition, clusterv1.DeletedReason, clusterv1.ConditionSeverityInfo, "") + // Carrier Gateway. + if s.scope.VPC().CarrierGatewayID != nil { + if err := s.deleteCarrierGateway(); err != nil { + conditions.MarkFalse(s.scope.InfraCluster(), infrav1.CarrierGatewayReadyCondition, "DeletingFailed", clusterv1.ConditionSeverityWarning, err.Error()) + return err + } + conditions.MarkFalse(s.scope.InfraCluster(), infrav1.CarrierGatewayReadyCondition, clusterv1.DeletedReason, clusterv1.ConditionSeverityInfo, "") + } + // Egress Only Internet Gateways. conditions.MarkFalse(s.scope.InfraCluster(), infrav1.EgressOnlyInternetGatewayReadyCondition, clusterv1.DeletingReason, clusterv1.ConditionSeverityInfo, "") if err := s.scope.PatchObject(); err != nil { diff --git a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/routetables.go b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/routetables.go index 0c096315b9a..66694b2dd35 100644 --- a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/routetables.go +++ b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/routetables.go @@ -340,6 +340,13 @@ func (s *Service) getGatewayPublicIPv6Route() *ec2.CreateRouteInput { } } +func (s *Service) getCarrierGatewayPublicIPv4Route() *ec2.CreateRouteInput { + return &ec2.CreateRouteInput{ + DestinationCidrBlock: aws.String(services.AnyIPv4CidrBlock), + CarrierGatewayId: aws.String(*s.scope.VPC().CarrierGatewayID), + } +} + func (s *Service) getRouteTableTagParams(id string, public bool, zone string) infrav1.BuildParams { var name strings.Builder @@ -373,6 +380,14 @@ func (s *Service) getRoutesToPublicSubnet(sn *infrav1.SubnetSpec) ([]*ec2.Create return nil, errors.Errorf("can't determine routes for unsupported ipv6 subnet in zone type %q", sn.ZoneType) } + if sn.IsEdgeWavelength() { + if s.scope.VPC().CarrierGatewayID == nil { + return routes, errors.Errorf("failed to create carrier routing table: carrier gateway for VPC %q is not present", s.scope.VPC().ID) + } + routes = append(routes, s.getCarrierGatewayPublicIPv4Route()) + return routes, nil + } + if s.scope.VPC().InternetGatewayID == nil { return routes, errors.Errorf("failed to create routing tables: internet gateway for VPC %q is not present", s.scope.VPC().ID) } diff --git a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/subnets.go b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/subnets.go index c69e9d323c3..f6406bd833e 100644 --- a/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/subnets.go +++ b/cluster-api/providers/aws/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/pkg/cloud/services/network/subnets.go @@ -410,6 +410,9 @@ func (s *Service) describeVpcSubnets() (infrav1.Subnets, error) { if route.GatewayId != nil && strings.HasPrefix(*route.GatewayId, "igw") { spec.IsPublic = true } + if route.CarrierGatewayId != nil && strings.HasPrefix(*route.CarrierGatewayId, "cagw-") { + spec.IsPublic = true + } } } @@ -468,6 +471,8 @@ func (s *Service) createSubnet(sn *infrav1.SubnetSpec) (*infrav1.SubnetSpec, err // IPv6 subnets are not generally supported by AWS Local Zones and Wavelength Zones. // Local Zones have limited zone support for IPv6 subnets: // https://docs.aws.amazon.com/local-zones/latest/ug/how-local-zones-work.html#considerations + // Wavelength Zones is currently not supporting IPv6 subnets. + // https://docs.aws.amazon.com/wavelength/latest/developerguide/wavelength-quotas.html#vpc-considerations if sn.IsIPv6 && sn.IsEdge() { err := fmt.Errorf("failed to create subnet: IPv6 is not supported with zone type %q", sn.ZoneType) record.Warnf(s.scope.InfraCluster(), "FailedCreateSubnet", "Failed creating managed Subnet for edge zones: %v", err) @@ -526,7 +531,12 @@ func (s *Service) createSubnet(sn *infrav1.SubnetSpec) (*infrav1.SubnetSpec, err record.Eventf(s.scope.InfraCluster(), "SuccessfulModifySubnetAttributes", "Modified managed Subnet %q attributes", *out.Subnet.SubnetId) } - if sn.IsPublic { + // AWS Wavelength Zone's public subnets does not support to map Carrier IP address on launch, and + // MapPublicIpOnLaunch option[1] set to the subnet will fail, instead set the EC2 instance's network + // interface to associate Carrier IP Address on launch[2]. + // [1] https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifySubnetAttribute.html + // [2] https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceNetworkInterfaceSpecification.html + if sn.IsPublic && !sn.IsEdgeWavelength() { if err := wait.WaitForWithRetryable(wait.NewBackoff(), func() (bool, error) { if _, err := s.EC2Client.ModifySubnetAttributeWithContext(context.TODO(), &ec2.ModifySubnetAttributeInput{ SubnetId: out.Subnet.SubnetId, diff --git a/vendor/modules.txt b/vendor/modules.txt index ae8a3545d83..e78b5076175 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -2115,7 +2115,7 @@ sigs.k8s.io/cluster-api/util/kubeconfig sigs.k8s.io/cluster-api/util/labels/format sigs.k8s.io/cluster-api/util/secret sigs.k8s.io/cluster-api/util/topology -# sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240424180139-4c5b811deab4 +# sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240426161541-ac4958082eab ## explicit; go 1.21 sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1 sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2 diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go index 5a802ff2c7b..382a4cd4d36 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/awscluster_conversion.go @@ -103,6 +103,7 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error { dst.Spec.NetworkSpec.VPC.EmptyRoutesDefaultVPCSecurityGroup = restored.Spec.NetworkSpec.VPC.EmptyRoutesDefaultVPCSecurityGroup dst.Spec.NetworkSpec.VPC.PrivateDNSHostnameTypeOnLaunch = restored.Spec.NetworkSpec.VPC.PrivateDNSHostnameTypeOnLaunch + dst.Spec.NetworkSpec.VPC.CarrierGatewayID = restored.Spec.NetworkSpec.VPC.CarrierGatewayID // Restore SubnetSpec.ResourceID, SubnetSpec.ParentZoneName, and SubnetSpec.ZoneType fields, if any. for _, subnet := range restored.Spec.NetworkSpec.Subnets { diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go index b6b6f29b047..10842bb9ae4 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta1/zz_generated.conversion.go @@ -2307,6 +2307,7 @@ func autoConvert_v1beta2_VPCSpec_To_v1beta1_VPCSpec(in *v1beta2.VPCSpec, out *VP out.IPv6 = nil } out.InternetGatewayID = (*string)(unsafe.Pointer(in.InternetGatewayID)) + // WARNING: in.CarrierGatewayID requires manual conversion: does not exist in peer-type out.Tags = *(*Tags)(unsafe.Pointer(&in.Tags)) out.AvailabilityZoneUsageLimit = (*int)(unsafe.Pointer(in.AvailabilityZoneUsageLimit)) out.AvailabilityZoneSelection = (*AZSelectionScheme)(unsafe.Pointer(in.AvailabilityZoneSelection)) diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/conditions_consts.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/conditions_consts.go index bfbb96c77a6..604ef8e1d5a 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/conditions_consts.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/conditions_consts.go @@ -69,6 +69,14 @@ const ( EgressOnlyInternetGatewayFailedReason = "EgressOnlyInternetGatewayFailed" ) +const ( + // CarrierGatewayReadyCondition reports on the successful reconciliation of carrier gateways. + // Only applicable to managed clusters. + CarrierGatewayReadyCondition clusterv1.ConditionType = "CarrierGatewayReady" + // CarrierGatewayFailedReason used when errors occur during carrier gateway reconciliation. + CarrierGatewayFailedReason = "CarrierGatewayFailed" +) + const ( // NatGatewaysReadyCondition reports successful reconciliation of NAT gateways. // Only applicable to managed clusters. diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go index c33e789a777..cd3042b717b 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/network_types.go @@ -46,6 +46,8 @@ const ( ZoneTypeAvailabilityZone ZoneType = "availability-zone" // ZoneTypeLocalZone defines the AWS zone type in Local Zone infrastructure. ZoneTypeLocalZone ZoneType = "local-zone" + // ZoneTypeWavelengthZone defines the AWS zone type in Wavelength infrastructure. + ZoneTypeWavelengthZone ZoneType = "wavelength-zone" ) // NetworkStatus encapsulates AWS networking resources. @@ -409,6 +411,12 @@ type VPCSpec struct { // +optional InternetGatewayID *string `json:"internetGatewayId,omitempty"` + // CarrierGatewayID is the id of the internet gateway associated with the VPC, + // for carrier network (Wavelength Zones). + // +optional + // +kubebuilder:validation:XValidation:rule="self.startsWith('cagw-')",message="Carrier Gateway ID must start with 'cagw-'" + CarrierGatewayID *string `json:"carrierGatewayId,omitempty"` + // Tags is a collection of tags describing the resource. Tags Tags `json:"tags,omitempty"` @@ -521,33 +529,36 @@ type SubnetSpec struct { // ZoneType defines the type of the zone where the subnet is created. // - // The valid values are availability-zone, and local-zone. + // The valid values are availability-zone, local-zone, and wavelength-zone. // // Subnet with zone type availability-zone (regular) is always selected to create cluster // resources, like Load Balancers, NAT Gateways, Contol Plane nodes, etc. // - // Subnet with zone type local-zone is not eligible to automatically create + // Subnet with zone type local-zone or wavelength-zone is not eligible to automatically create // regular cluster resources. // // The public subnet in availability-zone or local-zone is associated with regular public // route table with default route entry to a Internet Gateway. // + // The public subnet in wavelength-zone is associated with a carrier public + // route table with default route entry to a Carrier Gateway. + // // The private subnet in the availability-zone is associated with a private route table with // the default route entry to a NAT Gateway created in that zone. // - // The private subnet in the local-zone is associated with a private route table with + // The private subnet in the local-zone or wavelength-zone is associated with a private route table with // the default route entry re-using the NAT Gateway in the Region (preferred from the // parent zone, the zone type availability-zone in the region, or first table available). // - // +kubebuilder:validation:Enum=availability-zone;local-zone + // +kubebuilder:validation:Enum=availability-zone;local-zone;wavelength-zone // +optional ZoneType *ZoneType `json:"zoneType,omitempty"` // ParentZoneName is the zone name where the current subnet's zone is tied when // the zone is a Local Zone. // - // The subnets in Local Zone locations consume the ParentZoneName to determine the correct - // private route table to egress traffic to the internet. + // The subnets in Local Zone or Wavelength Zone locations consume the ParentZoneName + // to select the correct private route table to egress traffic to the internet. // // +optional ParentZoneName *string `json:"parentZoneName,omitempty"` @@ -570,7 +581,27 @@ func (s *SubnetSpec) String() string { // IsEdge returns the true when the subnet is created in the edge zone, // Local Zones. func (s *SubnetSpec) IsEdge() bool { - return s.ZoneType != nil && *s.ZoneType == ZoneTypeLocalZone + if s.ZoneType == nil { + return false + } + if s.ZoneType.Equal(ZoneTypeLocalZone) { + return true + } + if s.ZoneType.Equal(ZoneTypeWavelengthZone) { + return true + } + return false +} + +// IsEdgeWavelength returns true only when the subnet is created in Wavelength Zone. +func (s *SubnetSpec) IsEdgeWavelength() bool { + if s.ZoneType == nil { + return false + } + if *s.ZoneType == ZoneTypeWavelengthZone { + return true + } + return false } // SetZoneInfo updates the subnets with zone information. @@ -681,7 +712,7 @@ func (s Subnets) FilterPrivate() (res Subnets) { res = append(res, x) } } - return res + return } // FilterPublic returns a slice containing all subnets marked as public. @@ -695,7 +726,7 @@ func (s Subnets) FilterPublic() (res Subnets) { res = append(res, x) } } - return res + return } // FilterByZone returns a slice containing all subnets that live in the availability zone specified. @@ -705,7 +736,7 @@ func (s Subnets) FilterByZone(zone string) (res Subnets) { res = append(res, x) } } - return res + return } // GetUniqueZones returns a slice containing the unique zones of the subnets. @@ -731,6 +762,19 @@ func (s Subnets) SetZoneInfo(zones []*ec2.AvailabilityZone) error { return nil } +// HasPublicSubnetWavelength returns true when there are subnets in Wavelength zone. +func (s Subnets) HasPublicSubnetWavelength() bool { + for _, sub := range s { + if sub.ZoneType == nil { + return false + } + if sub.IsPublic && *sub.ZoneType == ZoneTypeWavelengthZone { + return true + } + } + return false +} + // CNISpec defines configuration for CNI. type CNISpec struct { // CNIIngressRules specify rules to apply to control plane and worker node security groups. @@ -953,3 +997,8 @@ type ZoneType string func (z ZoneType) String() string { return string(z) } + +// Equal compares two zone types. +func (z ZoneType) Equal(other ZoneType) bool { + return z == other +} diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go index ea2b248a1cb..81b8a8d3148 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/zz_generated.deepcopy.go @@ -2130,6 +2130,11 @@ func (in *VPCSpec) DeepCopyInto(out *VPCSpec) { *out = new(string) **out = **in } + if in.CarrierGatewayID != nil { + in, out := &in.CarrierGatewayID, &out.CarrierGatewayID + *out = new(string) + **out = **in + } if in.Tags != nil { in, out := &in.Tags, &out.Tags *out = make(Tags, len(*in)) From 3bb18a29c044db451cfb9bbd841d83ec76e2743e Mon Sep 17 00:00:00 2001 From: Marco Braga Date: Thu, 25 Apr 2024 01:37:24 -0300 Subject: [PATCH 3/3] go.mod: bump CAPA for AWS Wavelength support Bump cluster-api-provider-aws with support of AWS Wavelength Zones introduced in the PR 4901. The bump points to commit on branch main/ac4958082eab59edb4af74e0b7f72eef213ed7ce --- cluster-api/providers/aws/go.mod | 2 +- cluster-api/providers/aws/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cluster-api/providers/aws/go.mod b/cluster-api/providers/aws/go.mod index 09382e5267f..3fe522d5487 100644 --- a/cluster-api/providers/aws/go.mod +++ b/cluster-api/providers/aws/go.mod @@ -2,7 +2,7 @@ module openshift/installer/cluster-api/providers/aws go 1.21 -require sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240424180139-4c5b811deab4 +require sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240426161541-ac4958082eab require ( github.com/NYTimes/gziphandler v1.1.1 // indirect diff --git a/cluster-api/providers/aws/go.sum b/cluster-api/providers/aws/go.sum index 9c8df69acf7..7de2baae3cd 100644 --- a/cluster-api/providers/aws/go.sum +++ b/cluster-api/providers/aws/go.sum @@ -491,8 +491,8 @@ sigs.k8s.io/aws-iam-authenticator v0.6.13 h1:QSQcAkpt/hF97Ogyoz6sj3WD2twTd2cmxFb sigs.k8s.io/aws-iam-authenticator v0.6.13/go.mod h1:CnvFyzR/xeLHmUY/BD0qW6q0wp6KIwXmFp4eTfrHdP8= sigs.k8s.io/cluster-api v1.7.0 h1:sWK6xs2MkCqPZhumsrti0OdKyGcu/c5aBz9XAWFIq5E= sigs.k8s.io/cluster-api v1.7.0/go.mod h1:V9ZhKLvQtsDODwjXOKgbitjyCmC71yMBwDcMyNNIov0= -sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240424180139-4c5b811deab4 h1:umGM3rug7fWtcP61OPDeUT6XVAQvqPOaW30EjoXwsTU= -sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240424180139-4c5b811deab4/go.mod h1:Yk0azzVYeYIQX9z7HmSDMSY086gLjWjAEmCHD721eOo= +sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240426161541-ac4958082eab h1:sTbr4ErndV0GgyK6NImGRCE4qRgf7RrkqQ67ZWxOtnI= +sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240426161541-ac4958082eab/go.mod h1:Yk0azzVYeYIQX9z7HmSDMSY086gLjWjAEmCHD721eOo= sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk= sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/go.mod b/go.mod index 6c4ef54de56..d183d4ded0b 100644 --- a/go.mod +++ b/go.mod @@ -115,7 +115,7 @@ require ( k8s.io/utils v0.0.0-20240310230437-4693a0247e57 libvirt.org/go/libvirtxml v1.10002.0 sigs.k8s.io/cluster-api v1.7.0 - sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240424180139-4c5b811deab4 + sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240426161541-ac4958082eab sigs.k8s.io/cluster-api-provider-azure v1.14.2 sigs.k8s.io/cluster-api-provider-gcp v1.6.0 sigs.k8s.io/cluster-api-provider-ibmcloud v0.7.0 diff --git a/go.sum b/go.sum index 0fd66e5c59d..a945fc76ee7 100644 --- a/go.sum +++ b/go.sum @@ -3041,8 +3041,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/cluster-api v1.7.0 h1:sWK6xs2MkCqPZhumsrti0OdKyGcu/c5aBz9XAWFIq5E= sigs.k8s.io/cluster-api v1.7.0/go.mod h1:V9ZhKLvQtsDODwjXOKgbitjyCmC71yMBwDcMyNNIov0= -sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240424180139-4c5b811deab4 h1:umGM3rug7fWtcP61OPDeUT6XVAQvqPOaW30EjoXwsTU= -sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240424180139-4c5b811deab4/go.mod h1:Yk0azzVYeYIQX9z7HmSDMSY086gLjWjAEmCHD721eOo= +sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240426161541-ac4958082eab h1:sTbr4ErndV0GgyK6NImGRCE4qRgf7RrkqQ67ZWxOtnI= +sigs.k8s.io/cluster-api-provider-aws/v2 v2.4.2-0.20240426161541-ac4958082eab/go.mod h1:Yk0azzVYeYIQX9z7HmSDMSY086gLjWjAEmCHD721eOo= sigs.k8s.io/cluster-api-provider-azure v1.14.2 h1:e36ID51GbHlJKmHVxhM51HNXxf6y/1OczERpgka7MzE= sigs.k8s.io/cluster-api-provider-azure v1.14.2/go.mod h1:CA3u3DKaWi+S2vbOrr3f/dEIIAcI91IMfd36aXZ06F4= sigs.k8s.io/cluster-api-provider-gcp v1.6.0 h1:I/Fxzoh1RyHp/n7Do5nJlJgYoMuQ2SVzlz4TJhIc7qk=