Skip to content

Commit 0cf2bef

Browse files
committed
feat: Support ClusterV2 as ServerlessCluster
test crud
1 parent a18ef18 commit 0cf2bef

37 files changed

+4914
-73
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2025-05-13T05:06:21Z"
2+
build_date: "2025-05-14T01:29:03Z"
33
build_hash: 55bf57b2806c33a7fcd074be403f26ce3f8e58db
4-
go_version: go1.24.2
4+
go_version: go1.24.3
55
version: v0.46.2
6-
api_directory_checksum: 36fbfad1e0bff98a14b120ba292a7f6b4e546fb4
6+
api_directory_checksum: 83a6f2d33e6781954a317da21e666cd5195403b7
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.32.6
99
generator_config_info:
10-
file_checksum: 76a24bb9624894530a21ecedf80641625d3040c9
10+
file_checksum: a90f1407dba96f7e8716b2fb2fdc3da3ca82ee72
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
ignore:
22
resource_names:
33
#- Cluster
4-
- ClusterV2
4+
# - ClusterV2
55
- VpcConnection
66
- Replicator
77
#- Configuration
88
field_paths:
99
- ConnectivityInfo.VpcConnectivity
1010
- DescribeClusterOutput.ClusterInfo.BrokerNodeGroupInfo.ZoneIds
11-
11+
operations:
12+
CreateClusterV2:
13+
operation_type:
14+
- Create
15+
resource_name: ServerlessCluster
16+
DescribeClusterV2:
17+
operation_type:
18+
- Get
19+
resource_name: ServerlessCluster
1220
resources:
1321
Configuration:
1422
fields:
@@ -108,4 +116,55 @@ resources:
108116
is_read_only: true
109117
tags:
110118
# TODO(jaypipes): Ignore tags for now... we will add support later
111-
ignore: true
119+
ignore: true
120+
ServerlessCluster:
121+
is_arn_primary_key: true
122+
renames:
123+
operations:
124+
CreateClusterV2:
125+
input_fields:
126+
ClusterName: Name
127+
output_fields:
128+
ClusteName: Name
129+
ClusterType: Type
130+
DescribeClusterV2:
131+
input_fields:
132+
output_fields:
133+
ClusterName: Name
134+
ClusterType: Type
135+
fields:
136+
AssociatedScramSecrets:
137+
type: "[]*string"
138+
references:
139+
resource: Secret
140+
service_name: secretsmanager
141+
path: Status.ACKResourceMetadata.ARN
142+
ClusterARN:
143+
is_arn: true
144+
CurrentVersion:
145+
from:
146+
operation: DescribeCluster
147+
path: ClusterInfo.CurrentVersion
148+
is_read_only: true
149+
Type:
150+
go_tag: json:"type,omitempty"
151+
hooks:
152+
sdk_read_one_post_set_output:
153+
template_path: hooks/serverless_cluster/sdk_read_one_post_set_output.go.tpl
154+
sdk_create_post_set_output:
155+
template_path: hooks/serverless_cluster/sdk_create_post_set_output.go.tpl
156+
sdk_update_pre_build_request:
157+
template_path: hooks/serverless_cluster/sdk_update_pre_build_request.go.tpl
158+
sdk_delete_pre_build_request:
159+
template_path: hooks/serverless_cluster/sdk_delete_pre_build_request.go.tpl
160+
delta_pre_compare:
161+
code: customPreCompare(delta, a, b)
162+
update_operation:
163+
custom_method_name: customUpdate
164+
delete_operation:
165+
custom_method_name: customDelete
166+
synced:
167+
when:
168+
- path: Status.State
169+
in:
170+
- ACTIVE

apis/v1alpha1/serverless_cluster.go

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

apis/v1alpha1/types.go

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

0 commit comments

Comments
 (0)