diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index ded809f2..ba1ee3bf 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -7,6 +7,7 @@ aliases: - michaelhtm - TiberiuGC - rushmash91 + - knottnt # emeritus-core-ack-team: # - jaypipes # - jljaco diff --git a/apis/v1alpha1/ack-generate-metadata.yaml b/apis/v1alpha1/ack-generate-metadata.yaml index 77b56e72..1f8cc2c1 100755 --- a/apis/v1alpha1/ack-generate-metadata.yaml +++ b/apis/v1alpha1/ack-generate-metadata.yaml @@ -1,9 +1,9 @@ ack_generate_info: - build_date: "2025-04-23T21:54:50Z" - build_hash: 0909e7f0adb8ffe4120a8c20d5d58b991f2539e9 - go_version: go1.24.1 - version: v0.44.0-3-g0909e7f -api_directory_checksum: 29e783658b9bc19537d366523638f79284000012 + build_date: "2025-05-02T16:53:57Z" + build_hash: f8dc5330705b3752ce07dce0ac831161fd4cb14f + go_version: go1.24.2 + version: v0.45.0 +api_directory_checksum: 3df6921566512e42abdabd564c80aea5311d410a api_version: v1alpha1 aws_sdk_go_version: v1.32.6 generator_config_info: diff --git a/config/controller/kustomization.yaml b/config/controller/kustomization.yaml index 838aad01..1c9e65c8 100644 --- a/config/controller/kustomization.yaml +++ b/config/controller/kustomization.yaml @@ -6,4 +6,4 @@ kind: Kustomization images: - name: controller newName: public.ecr.aws/aws-controllers-k8s/ec2-controller - newTag: 1.4.2 + newTag: 1.4.3 diff --git a/go.mod b/go.mod index bdbd9b59..a38d9a86 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ module github.com/aws-controllers-k8s/ec2-controller -go 1.23.0 +go 1.24.0 toolchain go1.24.1 require ( - github.com/aws-controllers-k8s/runtime v0.44.0 + github.com/aws-controllers-k8s/runtime v0.45.0 github.com/aws/aws-sdk-go v1.49.0 github.com/aws/aws-sdk-go-v2 v1.35.0 github.com/aws/aws-sdk-go-v2/service/ec2 v1.202.1 diff --git a/go.sum b/go.sum index c304511c..8cdc9b8a 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/aws-controllers-k8s/runtime v0.44.0 h1:Et0Gikkxx4tJ6+dyK6w88DZqYRbpUTpBHCEny0X7gLQ= -github.com/aws-controllers-k8s/runtime v0.44.0/go.mod h1:G2UMBKA7qgXG4JV16NTIUp715uqvUEvWaa7TG1I527U= +github.com/aws-controllers-k8s/runtime v0.45.0 h1:b0xCqIE1SNve/jcJPW/QkCGkDmjxWtWTDFHKZpHJcFQ= +github.com/aws-controllers-k8s/runtime v0.45.0/go.mod h1:G2UMBKA7qgXG4JV16NTIUp715uqvUEvWaa7TG1I527U= github.com/aws/aws-sdk-go v1.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY= github.com/aws/aws-sdk-go v1.49.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.35.0 h1:jTPxEJyzjSuuz0wB+302hr8Eu9KUI+Zv8zlujMGJpVI= diff --git a/helm/Chart.yaml b/helm/Chart.yaml index ea21d448..e4dac63f 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: ec2-chart description: A Helm chart for the ACK service controller for Amazon Elastic Cloud Compute (EC2) -version: 1.4.2 -appVersion: 1.4.2 +version: 1.4.3 +appVersion: 1.4.3 home: https://github.com/aws-controllers-k8s/ec2-controller icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png sources: diff --git a/helm/templates/NOTES.txt b/helm/templates/NOTES.txt index 18d6e0bf..125dc13a 100644 --- a/helm/templates/NOTES.txt +++ b/helm/templates/NOTES.txt @@ -1,5 +1,5 @@ {{ .Chart.Name }} has been installed. -This chart deploys "public.ecr.aws/aws-controllers-k8s/ec2-controller:1.4.2". +This chart deploys "public.ecr.aws/aws-controllers-k8s/ec2-controller:1.4.3". Check its status by running: kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" diff --git a/helm/values.yaml b/helm/values.yaml index 0b53e926..20bd842c 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -4,7 +4,7 @@ image: repository: public.ecr.aws/aws-controllers-k8s/ec2-controller - tag: 1.4.2 + tag: 1.4.3 pullPolicy: IfNotPresent pullSecrets: [] diff --git a/pkg/resource/capacity_reservation/resource.go b/pkg/resource/capacity_reservation/resource.go index 03683c5b..02f11292 100644 --- a/pkg/resource/capacity_reservation/resource.go +++ b/pkg/resource/capacity_reservation/resource.go @@ -16,6 +16,8 @@ package capacity_reservation import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["capacityReservationID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: capacityReservationID")) } r.ko.Status.CapacityReservationID = &tmp diff --git a/pkg/resource/dhcp_options/resource.go b/pkg/resource/dhcp_options/resource.go index 0314a4d8..20b3f52d 100644 --- a/pkg/resource/dhcp_options/resource.go +++ b/pkg/resource/dhcp_options/resource.go @@ -16,6 +16,8 @@ package dhcp_options import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["dhcpOptionsID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: dhcpOptionsID")) } r.ko.Status.DHCPOptionsID = &tmp diff --git a/pkg/resource/elastic_ip_address/resource.go b/pkg/resource/elastic_ip_address/resource.go index b3490683..cf897557 100644 --- a/pkg/resource/elastic_ip_address/resource.go +++ b/pkg/resource/elastic_ip_address/resource.go @@ -16,6 +16,8 @@ package elastic_ip_address import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["allocationID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: allocationID")) } r.ko.Status.AllocationID = &tmp diff --git a/pkg/resource/flow_log/resource.go b/pkg/resource/flow_log/resource.go index 8c60c9d7..4241a007 100644 --- a/pkg/resource/flow_log/resource.go +++ b/pkg/resource/flow_log/resource.go @@ -16,6 +16,8 @@ package flow_log import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -105,7 +107,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["flowLogID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: flowLogID")) } r.ko.Status.FlowLogID = &tmp diff --git a/pkg/resource/instance/resource.go b/pkg/resource/instance/resource.go index ded0ef35..faf7916b 100644 --- a/pkg/resource/instance/resource.go +++ b/pkg/resource/instance/resource.go @@ -16,6 +16,8 @@ package instance import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["instanceID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: instanceID")) } r.ko.Status.InstanceID = &tmp diff --git a/pkg/resource/internet_gateway/resource.go b/pkg/resource/internet_gateway/resource.go index e5ef0555..64cc51b8 100644 --- a/pkg/resource/internet_gateway/resource.go +++ b/pkg/resource/internet_gateway/resource.go @@ -16,6 +16,8 @@ package internet_gateway import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["internetGatewayID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: internetGatewayID")) } r.ko.Status.InternetGatewayID = &tmp diff --git a/pkg/resource/launch_template/resource.go b/pkg/resource/launch_template/resource.go index b92ea4fc..7fd7e910 100644 --- a/pkg/resource/launch_template/resource.go +++ b/pkg/resource/launch_template/resource.go @@ -16,6 +16,8 @@ package launch_template import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["id"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: id")) } r.ko.Status.ID = &tmp diff --git a/pkg/resource/nat_gateway/resource.go b/pkg/resource/nat_gateway/resource.go index 16749b52..6a697e18 100644 --- a/pkg/resource/nat_gateway/resource.go +++ b/pkg/resource/nat_gateway/resource.go @@ -16,6 +16,8 @@ package nat_gateway import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["natGatewayID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: natGatewayID")) } r.ko.Status.NATGatewayID = &tmp diff --git a/pkg/resource/network_acl/resource.go b/pkg/resource/network_acl/resource.go index 371407bb..248a5e81 100644 --- a/pkg/resource/network_acl/resource.go +++ b/pkg/resource/network_acl/resource.go @@ -16,6 +16,8 @@ package network_acl import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["id"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: id")) } r.ko.Status.ID = &tmp diff --git a/pkg/resource/route_table/resource.go b/pkg/resource/route_table/resource.go index 38df58ce..ffde5324 100644 --- a/pkg/resource/route_table/resource.go +++ b/pkg/resource/route_table/resource.go @@ -16,6 +16,8 @@ package route_table import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["routeTableID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: routeTableID")) } r.ko.Status.RouteTableID = &tmp diff --git a/pkg/resource/security_group/resource.go b/pkg/resource/security_group/resource.go index 1ab46a7d..0e228bdd 100644 --- a/pkg/resource/security_group/resource.go +++ b/pkg/resource/security_group/resource.go @@ -16,6 +16,8 @@ package security_group import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["id"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: id")) } r.ko.Status.ID = &tmp diff --git a/pkg/resource/subnet/resource.go b/pkg/resource/subnet/resource.go index a15722f1..4388220b 100644 --- a/pkg/resource/subnet/resource.go +++ b/pkg/resource/subnet/resource.go @@ -16,6 +16,8 @@ package subnet import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["subnetID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: subnetID")) } r.ko.Status.SubnetID = &tmp diff --git a/pkg/resource/transit_gateway/resource.go b/pkg/resource/transit_gateway/resource.go index 4e6d60b0..99159ee7 100644 --- a/pkg/resource/transit_gateway/resource.go +++ b/pkg/resource/transit_gateway/resource.go @@ -16,6 +16,8 @@ package transit_gateway import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["transitGatewayID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: transitGatewayID")) } r.ko.Status.TransitGatewayID = &tmp diff --git a/pkg/resource/transit_gateway_vpc_attachment/resource.go b/pkg/resource/transit_gateway_vpc_attachment/resource.go index a572c731..7b1abcc9 100644 --- a/pkg/resource/transit_gateway_vpc_attachment/resource.go +++ b/pkg/resource/transit_gateway_vpc_attachment/resource.go @@ -16,6 +16,8 @@ package transit_gateway_vpc_attachment import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["id"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: id")) } r.ko.Status.ID = &tmp diff --git a/pkg/resource/vpc/resource.go b/pkg/resource/vpc/resource.go index ceb458ab..3b347834 100644 --- a/pkg/resource/vpc/resource.go +++ b/pkg/resource/vpc/resource.go @@ -16,6 +16,8 @@ package vpc import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["vpcID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: vpcID")) } r.ko.Status.VPCID = &tmp diff --git a/pkg/resource/vpc_endpoint/resource.go b/pkg/resource/vpc_endpoint/resource.go index aebe2da6..05ac201f 100644 --- a/pkg/resource/vpc_endpoint/resource.go +++ b/pkg/resource/vpc_endpoint/resource.go @@ -16,6 +16,8 @@ package vpc_endpoint import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["vpcEndpointID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: vpcEndpointID")) } r.ko.Status.VPCEndpointID = &tmp diff --git a/pkg/resource/vpc_endpoint_service_configuration/resource.go b/pkg/resource/vpc_endpoint_service_configuration/resource.go index 806b12d9..d19d274f 100644 --- a/pkg/resource/vpc_endpoint_service_configuration/resource.go +++ b/pkg/resource/vpc_endpoint_service_configuration/resource.go @@ -16,6 +16,8 @@ package vpc_endpoint_service_configuration import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["serviceID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: serviceID")) } r.ko.Status.ServiceID = &tmp diff --git a/pkg/resource/vpc_peering_connection/resource.go b/pkg/resource/vpc_peering_connection/resource.go index d1c728ae..297f3f7d 100644 --- a/pkg/resource/vpc_peering_connection/resource.go +++ b/pkg/resource/vpc_peering_connection/resource.go @@ -16,6 +16,8 @@ package vpc_peering_connection import ( + "fmt" + ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1" ackerrors "github.com/aws-controllers-k8s/runtime/pkg/errors" acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" @@ -97,7 +99,7 @@ func (r *resource) SetIdentifiers(identifier *ackv1alpha1.AWSIdentifiers) error func (r *resource) PopulateResourceFromAnnotation(fields map[string]string) error { tmp, ok := fields["vpcPeeringConnectionID"] if !ok { - return ackerrors.MissingNameIdentifier + return ackerrors.NewTerminalError(fmt.Errorf("required field missing: vpcPeeringConnectionID")) } r.ko.Status.VPCPeeringConnectionID = &tmp