Skip to content

Generate Instance CRD #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 2, 2022
10 changes: 5 additions & 5 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2022-05-10T23:41:20Z"
build_hash: c651d2bb60694df1f7a5dad823258472a1a6fc8a
build_date: "2022-06-02T15:43:18Z"
build_hash: f65a1edc5cee4768ee4fd34b9932799d50c56240
go_version: go1.18.1
version: v0.18.4-12-gc651d2b
api_directory_checksum: 1d50f8d633cac0c132fe1f1fb8dad566a20c44db
version: v0.18.4-14-gf65a1ed-dirty
api_directory_checksum: 1d5df6d5b0ea731e73f922da612e643a28ff8ea1
api_version: v1alpha1
aws_sdk_go_version: v1.42.0
generator_config_info:
file_checksum: 0dadc8ea417c3f3bacb05c27d0988207733d4e0f
file_checksum: 89addadb5e22cf16b15db6de95c333a0b53f2a68
original_file_name: generator.yaml
last_modification:
reason: API generation
55 changes: 54 additions & 1 deletion apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ ignore:
# support EC2-VPC only
- AllocateAddressInput.Domain
- AllocateAddressOutput.Domain
- Instance.ClientToken
- InstanceNetworkInterfaceSpecification.Groups
- RunInstancesInput.AdditionalInfo
- RunInstancesInput.ClientToken
- RunInstancesInput.DryRun
- RunInstancesInput.TagSpecifications
- TerminateInstancesInput.DryRun
resource_names:
- AccountAttribute
- CapacityReservation
Expand All @@ -38,7 +45,7 @@ ignore:
- Fleet
- FpgaImage
- Image
- Instance
#- Instance
- InstanceEventWindow
- InstanceExportTask
#- InternetGateway
Expand Down Expand Up @@ -111,12 +118,58 @@ operations:
operation_type:
- Delete
resource_name: VpcEndpoint
RunInstances:
#ouput shape: Reservation
output_wrapper_field_path: Instances
operation_type:
- Create
resource_name: Instance
override_values:
# Hard-code MaxCount and MinCount to 1 so the Reservation
# response can only contain a single instance. This
# instance will be managed by the Instance controller.
# Although RunInstances can handle creating multiple
# instances at once (returning them in a single Reservation),
# a Reservation controller does not align with the declarative state model
# in Kubernetes because users would not be able to update the underlying instances.
MaxCount: 1
MinCount: 1
DescribeInstances:
#output shape: DescribeInstancesOutput
output_wrapper_field_path: Reservations.Instances
operation_type:
- List
resource_name: Instance
TerminateInstances:
operation_type:
- Delete
resource_name: Instance
resources:
DhcpOptions:
fields:
DHCPConfigurations.Values:
set:
- from: AttributeValue.Value
Instance:
fields:
HibernationOptions:
late_initialize: {}
MaxCount:
is_required: false
MinCount:
is_required: false
SecurityGroups:
set:
- from: GroupName
Tags:
from:
operation: CreateTags
path: Tags
hooks:
sdk_create_post_build_request:
template_path: hooks/instance/sdk_create_post_build_request.go.tpl
sdk_delete_post_build_request:
template_path: hooks/instance/sdk_delete_post_build_request.go.tpl
ElasticIPAddress:
exceptions:
terminal_codes:
Expand Down
378 changes: 378 additions & 0 deletions apis/v1alpha1/instance.go

Large diffs are not rendered by default.

Loading