Skip to content

Commit 3f8b452

Browse files
authored
Merge branch 'main' into capi-1.12-bump
2 parents 361e908 + a681199 commit 3f8b452

99 files changed

Lines changed: 43786 additions & 10239 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-ami-varsfile.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
image_builder_version:
77
description: "Image builder version"
88
required: true
9-
default: 'v0.1.38'
9+
default: 'v0.1.48'
1010
target:
1111
description: "target os"
1212
required: true
@@ -42,7 +42,7 @@ jobs:
4242
echo "$PACKER_VARS" | jq -r > ./images/capi/vars.json
4343
cat ./images/capi/vars.json
4444
- name: Configure AWS credentials
45-
uses: aws-actions/configure-aws-credentials@v5
45+
uses: aws-actions/configure-aws-credentials@v6
4646
with:
4747
aws-region: us-east-2
4848
role-to-assume: arn:aws:iam::819546954734:role/gh-image-builder

.github/workflows/build-ami.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
image_builder_version:
77
description: "Image builder version"
88
required: true
9-
default: 'v0.1.38'
9+
default: 'v0.1.48'
1010
regions:
1111
description: 'Publication regions'
1212
required: true
@@ -54,7 +54,7 @@ jobs:
5454
ref: ${{ inputs.image_builder_version }}
5555
fetch-depth: 0
5656
- name: Configure AWS credentials
57-
uses: aws-actions/configure-aws-credentials@v5
57+
uses: aws-actions/configure-aws-credentials@v6
5858
with:
5959
aws-region: us-east-2
6060
role-to-assume: arn:aws:iam::819546954734:role/gh-image-builder

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ linters:
365365
- linters:
366366
- staticcheck
367367
text: "s.scope.ControlPlaneLoadBalancer is deprecated"
368+
- linters:
369+
- staticcheck
370+
path: bootstrap/eks/
371+
text: 'SA1019: (.*)EKSConfig is deprecated'
368372
paths:
369373
- third_party$
370374
- builtin$

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ test-e2e: $(KIND) $(SSM_PLUGIN) $(KUSTOMIZE) generate-test-flavors e2e-image ##
467467

468468
.PHONY: test-e2e-eks ## Run EKS e2e tests using clusterctl
469469
test-e2e-eks: generate-test-flavors $(KIND) $(SSM_PLUGIN) $(KUSTOMIZE) e2e-image ## Run eks e2e tests
470-
time go run github.com/onsi/ginkgo/v2/ginkgo -tags=e2e $(GINKGO_ARGS) ./test/e2e/suites/managed/... -- -config-path="$(E2E_EKS_CONF_PATH)" --source-template="$(EKS_SOURCE_TEMPLATE)" $(E2E_ARGS) $(EKS_E2E_ARGS)
470+
time go run github.com/onsi/ginkgo/v2/ginkgo -tags=e2e $(GINKGO_ARGS) -nodes 2 ./test/e2e/suites/managed/... -- -config-path="$(E2E_EKS_CONF_PATH)" --source-template="$(EKS_SOURCE_TEMPLATE)" $(E2E_ARGS) $(EKS_E2E_ARGS)
471471

472472
CONFORMANCE_E2E_ARGS ?= -kubetest.config-file=$(KUBETEST_CONF_PATH)
473473
CONFORMANCE_E2E_ARGS += $(E2E_ARGS)

api/v1beta1/awscluster_conversion.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error {
6161
dst.Status.Bastion.PrivateDNSName = restored.Status.Bastion.PrivateDNSName
6262
dst.Status.Bastion.PublicIPOnLaunch = restored.Status.Bastion.PublicIPOnLaunch
6363
dst.Status.Bastion.NetworkInterfaceType = restored.Status.Bastion.NetworkInterfaceType
64+
dst.Status.Bastion.AssignPrimaryIPv6 = restored.Status.Bastion.AssignPrimaryIPv6
6465
dst.Status.Bastion.CapacityReservationID = restored.Status.Bastion.CapacityReservationID
6566
dst.Status.Bastion.MarketType = restored.Status.Bastion.MarketType
6667
dst.Status.Bastion.HostAffinity = restored.Status.Bastion.HostAffinity
6768
dst.Status.Bastion.HostID = restored.Status.Bastion.HostID
6869
dst.Status.Bastion.CapacityReservationPreference = restored.Status.Bastion.CapacityReservationPreference
6970
dst.Status.Bastion.CPUOptions = restored.Status.Bastion.CPUOptions
71+
dst.Status.Bastion.IPv6Address = restored.Status.Bastion.IPv6Address
7072
if restored.Status.Bastion.DynamicHostAllocation != nil {
7173
dst.Status.Bastion.DynamicHostAllocation = restored.Status.Bastion.DynamicHostAllocation
7274
}
@@ -158,6 +160,7 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error {
158160
func restoreControlPlaneLoadBalancerStatus(restored, dst *infrav1.LoadBalancer) {
159161
dst.ARN = restored.ARN
160162
dst.LoadBalancerType = restored.LoadBalancerType
163+
dst.LoadBalancerIPAddressType = restored.LoadBalancerIPAddressType
161164
dst.ELBAttributes = restored.ELBAttributes
162165
dst.ELBListeners = restored.ELBListeners
163166
dst.Name = restored.Name
@@ -195,6 +198,7 @@ func restoreControlPlaneLoadBalancer(restored, dst *infrav1.AWSLoadBalancerSpec)
195198
dst.Scheme = restored.Scheme
196199
dst.CrossZoneLoadBalancing = restored.CrossZoneLoadBalancing
197200
dst.Subnets = restored.Subnets
201+
dst.TargetGroupIPType = restored.TargetGroupIPType
198202
}
199203

200204
// ConvertFrom converts the v1beta1 AWSCluster receiver to a v1beta1 AWSCluster.

api/v1beta1/awsmachine_conversion.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func (src *AWSMachine) ConvertTo(dstRaw conversion.Hub) error {
4848
dst.Spec.HostAffinity = restored.Spec.HostAffinity
4949
dst.Spec.CapacityReservationPreference = restored.Spec.CapacityReservationPreference
5050
dst.Spec.NetworkInterfaceType = restored.Spec.NetworkInterfaceType
51+
dst.Spec.AssignPrimaryIPv6 = restored.Spec.AssignPrimaryIPv6
5152
dst.Spec.CPUOptions = restored.Spec.CPUOptions
5253
if restored.Spec.DynamicHostAllocation != nil {
5354
dst.Spec.DynamicHostAllocation = restored.Spec.DynamicHostAllocation
@@ -120,6 +121,7 @@ func (r *AWSMachineTemplate) ConvertTo(dstRaw conversion.Hub) error {
120121
dst.Spec.Template.Spec.HostAffinity = restored.Spec.Template.Spec.HostAffinity
121122
dst.Spec.Template.Spec.CapacityReservationPreference = restored.Spec.Template.Spec.CapacityReservationPreference
122123
dst.Spec.Template.Spec.NetworkInterfaceType = restored.Spec.Template.Spec.NetworkInterfaceType
124+
dst.Spec.Template.Spec.AssignPrimaryIPv6 = restored.Spec.Template.Spec.AssignPrimaryIPv6
123125
dst.Spec.Template.Spec.CPUOptions = restored.Spec.Template.Spec.CPUOptions
124126
if restored.Spec.Template.Spec.DynamicHostAllocation != nil {
125127
dst.Spec.Template.Spec.DynamicHostAllocation = restored.Spec.Template.Spec.DynamicHostAllocation

api/v1beta1/network_types.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ type VPCSpec struct {
189189
// Defaults to 10.0.0.0/16.
190190
CidrBlock string `json:"cidrBlock,omitempty"`
191191

192-
// IPv6 contains ipv6 specific settings for the network. Supported only in managed clusters.
193-
// This field cannot be set on AWSCluster object.
192+
// IPv6 contains ipv6 specific settings for the network.
194193
// +optional
195194
IPv6 *IPv6 `json:"ipv6,omitempty"`
196195

@@ -249,7 +248,6 @@ type SubnetSpec struct {
249248

250249
// IPv6CidrBlock is the IPv6 CIDR block to be used when the provider creates a managed VPC.
251250
// A subnet can have an IPv4 and an IPv6 address.
252-
// IPv6 is only supported in managed clusters, this field cannot be set on AWSCluster object.
253251
// +optional
254252
IPv6CidrBlock string `json:"ipv6CidrBlock,omitempty"`
255253

@@ -260,8 +258,7 @@ type SubnetSpec struct {
260258
// +optional
261259
IsPublic bool `json:"isPublic"`
262260

263-
// IsIPv6 defines the subnet as an IPv6 subnet. A subnet is IPv6 when it is associated with a VPC that has IPv6 enabled.
264-
// IPv6 is only supported in managed clusters, this field cannot be set on AWSCluster object.
261+
// IsIPv6 defines the subnet as an IPv6 subnet. A subnet is IPv6 when it is associated with an IPv6 CIDR.
265262
// +optional
266263
IsIPv6 bool `json:"isIpv6,omitempty"`
267264

api/v1beta1/zz_generated.conversion.go

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta2/awscluster_types.go

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ type Bastion struct {
152152

153153
// AllowedCIDRBlocks is a list of CIDR blocks allowed to access the bastion host.
154154
// They are set as ingress rules for the Bastion host's Security Group (defaults to 0.0.0.0/0).
155+
// If the cluster has IPv6 enabled, defaults to ::/0 and 0.0.0.0/0.
155156
// +optional
156-
AllowedCIDRBlocks []string `json:"allowedCIDRBlocks,omitempty"`
157+
AllowedCIDRBlocks CidrBlocks `json:"allowedCIDRBlocks,omitempty"`
157158

158159
// InstanceType will use the specified instance type for the bastion. If not specified,
159160
// Cluster API Provider AWS will use t3.micro for all regions except us-east-1, where t2.micro
@@ -252,6 +253,15 @@ type AWSLoadBalancerSpec struct {
252253
// PreserveClientIP lets the user control if preservation of client ips must be retained or not.
253254
// If this is enabled 6443 will be opened to 0.0.0.0/0.
254255
PreserveClientIP bool `json:"preserveClientIP,omitempty"`
256+
257+
// TargetGroupIPType sets the IP address type for the target group.
258+
// Valid values are ipv4 and ipv6. If not specified, defaults to ipv4 unless
259+
// the VPC has IPv6 enabled, in which case it defaults to ipv6.
260+
// This applies to the API server target group.
261+
// This field cannot be set if LoadBalancerType is classic or disabled.
262+
// +kubebuilder:validation:Enum=ipv4;ipv6
263+
// +optional
264+
TargetGroupIPType *TargetGroupIPType `json:"targetGroupIPType,omitempty"`
255265
}
256266

257267
// AdditionalListenerSpec defines the desired state of an
@@ -271,6 +281,14 @@ type AdditionalListenerSpec struct {
271281
// HealthCheck sets the optional custom health check configuration to the API target group.
272282
// +optional
273283
HealthCheck *TargetGroupHealthCheckAdditionalSpec `json:"healthCheck,omitempty"`
284+
285+
// TargetGroupIPType sets the IP address type for the target group.
286+
// Valid values are ipv4 and ipv6. If not specified, defaults to ipv4 unless
287+
// the VPC has IPv6 enabled, in which case it defaults to ipv6.
288+
// This field cannot be set if LoadBalancerType is classic or disabled.
289+
// +kubebuilder:validation:Enum=ipv4;ipv6
290+
// +optional
291+
TargetGroupIPType *TargetGroupIPType `json:"targetGroupIPType,omitempty"`
274292
}
275293

276294
// AWSClusterStatus defines the observed state of AWSCluster.
@@ -323,7 +341,8 @@ type S3Bucket struct {
323341
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Cluster infrastructure is ready for EC2 instances"
324342
// +kubebuilder:printcolumn:name="VPC",type="string",JSONPath=".spec.network.vpc.id",description="AWS VPC the cluster is using"
325343
// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.controlPlaneEndpoint",description="API Endpoint",priority=1
326-
// +kubebuilder:printcolumn:name="Bastion IP",type="string",JSONPath=".status.bastion.publicIp",description="Bastion IP address for breakglass access"
344+
// +kubebuilder:printcolumn:name="Bastion IP",type="string",JSONPath=".status.bastion.publicIp",description="Bastion IPv4 address for breakglass access"
345+
// +kubebuilder:printcolumn:name="Bastion IPv6",type="string",JSONPath=".status.bastion.ipv6Address",description="Bastion IPv6 address for breakglass access"
327346
// +k8s:defaulter-gen=true
328347

329348
// AWSCluster is the schema for Amazon EC2 based Kubernetes Cluster API.

0 commit comments

Comments
 (0)