Skip to content

Commit e0af7b2

Browse files
authored
Capacity reservations feature implementation (#235)
Issue: aws-controllers-k8s/community#2234 Description of changes: This change implements capacity reservations feature in ec2 operator. It adds e2e tests for the capacity reservations CRUD functionality. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 457bffd commit e0af7b2

33 files changed

+4872
-850
lines changed

ATTRIBUTION.md

Lines changed: 996 additions & 739 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2025-02-06T03:30:50Z"
2+
build_date: "2025-02-09T23:26:36Z"
33
build_hash: 8762917215d9902b2011a2b0b1b0c776855a683e
4-
go_version: go1.23.5
5-
version: v0.42.0
6-
api_directory_checksum: 14f0962baec09e795bcb014604b6515df6f0b85f
4+
go_version: go1.23.4
5+
version: v0.42.0-dirty
6+
api_directory_checksum: 6da0928938d9fb2e79fb8f7ab09fa6da0c5f3049
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.32.6
99
generator_config_info:
10-
file_checksum: 9ecd77fb465ff926f889ba25e718ad6472b71a75
10+
file_checksum: b3d6924c2a4a2252ea9a7fa775eb86bd1660eeef
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/capacity_reservation.go

Lines changed: 275 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/generator.yaml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ ignore:
99
field_paths:
1010
- AllocateAddressInput.DryRun
1111
- AllocateAddressInput.TagSpecifications
12+
- CreateCapacityReservationInput.TagSpecifications
13+
- CreateCapacityReservationInput.DryRun
14+
- CreateCapacityReservationInput.ClientToken
1215
- CreateDhcpOptionsInput.DryRun
1316
- CreateDhcpOptionsInput.TagSpecifications
1417
- CreateFlowLogsInput.DryRun
@@ -113,7 +116,7 @@ ignore:
113116
- IpamExternalResourceVerificationToken
114117
- VpcBlockPublicAccessExclusion
115118
- AccountAttribute
116-
- CapacityReservation
119+
# - CapacityReservation
117120
- CapacityReservationFleet
118121
- CarrierGateway
119122
- ClientVpnEndpoint
@@ -200,6 +203,10 @@ operations:
200203
operation_type:
201204
- Create
202205
resource_name: ElasticIPAddress
206+
CancelCapacityReservation:
207+
operation_type:
208+
- Delete
209+
resource_name: CapacityReservation
203210
DescribeAddresses:
204211
operation_type:
205212
- List
@@ -273,6 +280,32 @@ operations:
273280
- Update
274281
resource_name: VpcPeeringConnection
275282
resources:
283+
CapacityReservation:
284+
fields:
285+
Tags:
286+
from:
287+
operation: CreateTags
288+
path: Tags
289+
AdditionalInfo:
290+
from:
291+
operation: ModifyCapacityReservation
292+
path: AdditionalInfo
293+
CapacityReservationID:
294+
print:
295+
name: ID
296+
State:
297+
print:
298+
name: STATE
299+
StartDate:
300+
print:
301+
name: START_DATE
302+
hooks:
303+
sdk_create_post_build_request:
304+
template_path: hooks/capacity_reservation/sdk_create_post_build_request.go.tpl
305+
sdk_update_pre_build_request:
306+
template_path: hooks/capacity_reservation/sdk_update_pre_build_request.go.tpl
307+
sdk_update_post_set_output:
308+
template_path: hooks/capacity_reservation/sdk_update_post_set_output.go.tpl
276309
DhcpOptions:
277310
exceptions:
278311
terminal_codes:

0 commit comments

Comments
 (0)