Skip to content

feat: Support ClusterV2 as ServerlessCluster #66

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ api_directory_checksum: 36fbfad1e0bff98a14b120ba292a7f6b4e546fb4
api_version: v1alpha1
aws_sdk_go_version: v1.32.6
generator_config_info:
file_checksum: 76a24bb9624894530a21ecedf80641625d3040c9
file_checksum: a90f1407dba96f7e8716b2fb2fdc3da3ca82ee72
original_file_name: generator.yaml
last_modification:
reason: API generation
65 changes: 62 additions & 3 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
ignore:
resource_names:
#- Cluster
- ClusterV2
# - ClusterV2
- VpcConnection
- Replicator
#- Configuration
field_paths:
- ConnectivityInfo.VpcConnectivity
- DescribeClusterOutput.ClusterInfo.BrokerNodeGroupInfo.ZoneIds

operations:
CreateClusterV2:
operation_type:
- Create
resource_name: ServerlessCluster
DescribeClusterV2:
operation_type:
- Get
resource_name: ServerlessCluster
resources:
Configuration:
fields:
Expand Down Expand Up @@ -108,4 +116,55 @@ resources:
is_read_only: true
tags:
# TODO(jaypipes): Ignore tags for now... we will add support later
ignore: true
ignore: true
ServerlessCluster:
is_arn_primary_key: true
renames:
operations:
CreateClusterV2:
input_fields:
ClusterName: Name
output_fields:
ClusteName: Name
ClusterType: Type
DescribeClusterV2:
input_fields:
output_fields:
ClusterName: Name
ClusterType: Type
fields:
AssociatedScramSecrets:
type: "[]*string"
references:
resource: Secret
service_name: secretsmanager
path: Status.ACKResourceMetadata.ARN
ClusterARN:
is_arn: true
CurrentVersion:
from:
operation: DescribeCluster
path: ClusterInfo.CurrentVersion
is_read_only: true
Type:
go_tag: json:"type,omitempty"
hooks:
sdk_read_one_post_set_output:
template_path: hooks/serverless_cluster/sdk_read_one_post_set_output.go.tpl
sdk_create_post_set_output:
template_path: hooks/serverless_cluster/sdk_create_post_set_output.go.tpl
sdk_update_pre_build_request:
template_path: hooks/serverless_cluster/sdk_update_pre_build_request.go.tpl
sdk_delete_pre_build_request:
template_path: hooks/serverless_cluster/sdk_delete_pre_build_request.go.tpl
delta_pre_compare:
code: customPreCompare(delta, a, b)
update_operation:
custom_method_name: customUpdate
delete_operation:
custom_method_name: customDelete
synced:
when:
- path: Status.State
in:
- ACTIVE
83 changes: 83 additions & 0 deletions apis/v1alpha1/serverless_cluster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 37 additions & 7 deletions apis/v1alpha1/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading