Skip to content

Commit 9ce40df

Browse files
authored
Generate FileSystem resource (#1)
aws-controllers-k8s/community#328 Generate `FileSystem` 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 f4373ac commit 9ce40df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+5141
-248
lines changed
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: "2024-01-29T07:12:43Z"
3-
build_hash: 92f531cde5631865cfc3dfa778cbc9611f3a64c3
2+
build_date: "2024-02-10T21:13:26Z"
3+
build_hash: 6af91cdf64ccaf8cab2a43397266e57d1ec553de
44
go_version: go1.21.5
5-
version: v0.29.2
6-
api_directory_checksum: 5ce8aebe7f8f69326f1333783d90fdc05dca3920
5+
version: v0.29.2-5-g6af91cd
6+
api_directory_checksum: 299c791a97d38f7efb91e8747af9232447772100
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.50.0
99
generator_config_info:
10-
file_checksum: c3a9374853a9db6a8d308987c7bfaba35852a043
10+
file_checksum: e2802d282dc5f4cbdefc8e4c9e30596222eac5dd
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/file_system.go

Lines changed: 230 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: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,91 @@
11
ignore:
22
resource_names:
33
- AccessPoint
4-
- FileSystem
4+
# FileSystem
55
- MountTarget
66
- ReplicationConfiguration
7+
field_paths:
8+
- CreateFileSystemInput.CreationToken
9+
- FileSystemDescription.CreationToken
10+
- PutBackupPolicyInput.FileSystemId
11+
- PutLifecycleConfigurationInput.FileSystemId
12+
- PutFileSystemPolicyInput.FileSystemId
13+
- UpdateFileSystemProtectionInput.FileSystemId
714
model_name: elasticfilesystem
8-
controller_name: efs
15+
controller_name: efs
16+
resources:
17+
FileSystem:
18+
fields:
19+
KMSKeyID:
20+
references:
21+
resource: Key
22+
path: Status.ACKResourceMetadata.ARN
23+
service_name: kms
24+
FileSystemProtection:
25+
is_read_only: false
26+
from:
27+
operation: UpdateFileSystemProtection
28+
path: .
29+
BackupPolicy:
30+
from:
31+
operation: PutBackupPolicy
32+
path: BackupPolicy
33+
Policy:
34+
from:
35+
operation: PutFileSystemPolicy
36+
path: Policy
37+
LifecyclePolicies:
38+
from:
39+
operation: PutLifecycleConfiguration
40+
path: LifecyclePolicies
41+
hooks:
42+
delta_pre_compare:
43+
code: customPreCompare(delta, a, b)
44+
sdk_update_post_request:
45+
code: return desired, nil
46+
sdk_create_post_set_output:
47+
template_path: hooks/file_system/sdk_create_post_set_output.go.tpl
48+
sdk_read_many_post_set_output:
49+
template_path: hooks/file_system/sdk_read_many_post_set_output.go.tpl
50+
sdk_update_pre_build_request:
51+
template_path: hooks/file_system/sdk_update_pre_build_request.go.tpl
52+
print:
53+
add_age_column: true
54+
add_synced_column: true
55+
order_by: index
56+
additional_columns:
57+
- name: ID
58+
json_path: .status.fileSystemID
59+
type: string
60+
index: 10
61+
- name: ENCRYPTED
62+
json_path: .status.encrypted
63+
type: boolean
64+
index: 11
65+
- name: PERFORMANCEMODE
66+
json_path: .status.performanceMode
67+
type: string
68+
index: 15
69+
priority: 1
70+
- name: THROUGHPUTMODE
71+
json_path: .status.throughputMode
72+
type: string
73+
index: 16
74+
priority: 1
75+
- name: PROVISIONEDTHROUGHPUT
76+
json_path: .status.provisionedThroughputInMiBps
77+
type: string
78+
index: 17
79+
priority: 1
80+
- name: SIZE
81+
json_path: .status.sizeInBytes.value
82+
type: integer
83+
index: 20
84+
- name: MOUNTTARGETS
85+
json_path: .status.numberOfMountTargets
86+
type: integer
87+
index: 25
88+
- name: STATE
89+
json_path: .status.lifeCycleState
90+
type: string
91+
index: 30

0 commit comments

Comments
 (0)