Skip to content

Commit 0b8a06b

Browse files
authored
Generate MountTarget CRD (#4)
aws-controllers-k8s/community#328 Generate `MountTarget` resource - Add necessary hooks for create/update/delete methods - Add e2e tests for CRUD operations By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 58c34d3 commit 0b8a06b

40 files changed

+3098
-26
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2024-02-10T21:13:26Z"
2+
build_date: "2024-02-10T22:33:46Z"
33
build_hash: 6af91cdf64ccaf8cab2a43397266e57d1ec553de
44
go_version: go1.21.5
55
version: v0.29.2-5-g6af91cd
6-
api_directory_checksum: 299c791a97d38f7efb91e8747af9232447772100
6+
api_directory_checksum: 10383eb3d875d521f49d3d04af20466640088918
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.50.0
99
generator_config_info:
10-
file_checksum: e2802d282dc5f4cbdefc8e4c9e30596222eac5dd
10+
file_checksum: af9d4b44e466c5b36fe8b5ba2917949c29eab806
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/file_system.go

Lines changed: 3 additions & 3 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: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ignore:
22
resource_names:
33
- AccessPoint
44
# FileSystem
5-
- MountTarget
5+
# MountTarget
66
- ReplicationConfiguration
77
field_paths:
88
- CreateFileSystemInput.CreationToken
@@ -59,16 +59,16 @@ resources:
5959
type: string
6060
index: 10
6161
- name: ENCRYPTED
62-
json_path: .status.encrypted
62+
json_path: .spec.encrypted
6363
type: boolean
6464
index: 11
6565
- name: PERFORMANCEMODE
66-
json_path: .status.performanceMode
66+
json_path: .spec.performanceMode
6767
type: string
6868
index: 15
6969
priority: 1
7070
- name: THROUGHPUTMODE
71-
json_path: .status.throughputMode
71+
json_path: .spec.throughputMode
7272
type: string
7373
index: 16
7474
priority: 1
@@ -88,4 +88,71 @@ resources:
8888
- name: STATE
8989
json_path: .status.lifeCycleState
9090
type: string
91-
index: 30
91+
index: 30
92+
MountTarget:
93+
tags:
94+
ignore: true
95+
fields:
96+
FileSystemId:
97+
references:
98+
resource: FileSystem
99+
path: Status.FileSystemID
100+
SubnetId:
101+
references:
102+
resource: Subnet
103+
path: Status.SubnetID
104+
service_name: ec2
105+
SecurityGroups:
106+
references:
107+
resource: SecurityGroup
108+
path: Status.ID
109+
service_name: ec2
110+
update_operation:
111+
custom_method_name: customUpdateMountTarget
112+
hooks:
113+
sdk_create_post_set_output:
114+
template_path: hooks/mount_target/sdk_create_post_set_output.go.tpl
115+
sdk_read_many_post_build_request:
116+
template_path: hooks/mount_target/sdk_read_many_post_build_request.go.tpl
117+
sdk_read_many_post_set_output:
118+
template_path: hooks/mount_target/sdk_read_many_post_set_output.go.tpl
119+
print:
120+
add_age_column: true
121+
add_synced_column: true
122+
order_by: index
123+
additional_columns:
124+
- name: FILESYSTEMID
125+
json_path: .spec.fileSystemID
126+
type: string
127+
index: 10
128+
- name: MOUNTTARGETID
129+
json_path: .status.mountTargetID
130+
type: string
131+
index: 30
132+
- name: IPADDRESS
133+
json_path: .spec.ipAddress
134+
type: string
135+
index: 20
136+
- name: SUBNETID
137+
json_path: .spec.subnetID
138+
type: string
139+
index: 30
140+
- name: VPCID
141+
json_path: .status.vpcID
142+
type: string
143+
index: 35
144+
priority: 1
145+
- name: AVAILABILITYZONEID
146+
json_path: .status.availabilityZoneID
147+
type: string
148+
index: 36
149+
priority: 1
150+
- name: AVAILABILITYZONENAME
151+
json_path: .status.availabilityZoneName
152+
type: string
153+
index: 37
154+
priority: 1
155+
- name: STATE
156+
json_path: .status.lifeCycleState
157+
type: string
158+
index: 40

apis/v1alpha1/mount_target.go

Lines changed: 114 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: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)