Skip to content

Commit 070e518

Browse files
authored
add replication config support (#57)
Description of changes: - add replication config support for filesystem By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 2f9907e commit 070e518

24 files changed

+1071
-65
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2025-08-15T00:21:54Z"
3-
build_hash: b6df33f8c7f55b234555c0b578b8de43c74771a8
4-
go_version: go1.24.6
5-
version: v0.51.0
6-
api_directory_checksum: 01de06bb7dff101d9ebdbc6e252f3e526b493fb2
2+
build_date: "2025-09-03T18:27:05Z"
3+
build_hash: 1d9076d0211773ff8ab8682b28b912c7ece10676
4+
go_version: go1.25.0
5+
version: v0.51.0-2-g1d9076d
6+
api_directory_checksum: bce84152d4b1ec06243e6f2277eceb15f5610ca4
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.32.6
99
generator_config_info:
10-
file_checksum: 68ba2404c86e1c8b1f0bd0730312a146a6c4188f
10+
file_checksum: 38dfe37123c8f3156d5d6824c9c61cd586fc7b6a
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/file_system.go

Lines changed: 6 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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,29 @@ resources:
5757
from:
5858
operation: PutLifecycleConfiguration
5959
path: LifecyclePolicies
60+
ReplicationConfiguration:
61+
from:
62+
operation: CreateReplicationConfiguration
63+
path: Destinations
64+
ReplicationConfigurationStatus:
65+
is_read_only: true
66+
from:
67+
operation: DescribeReplicationConfigurations
68+
path: Replications.Destinations
69+
ReplicationConfiguration.KMSKeyID:
70+
references:
71+
resource: Key
72+
path: Status.ACKResourceMetadata.ARN
73+
service_name: kms
74+
ReplicationConfiguration.FileSystemID:
75+
references:
76+
resource: FileSystem
77+
path: Status.FileSystemID
78+
ReplicationConfiguration.RoleARN:
79+
references:
80+
resource: Role
81+
path: Status.ACKResourceMetadata.ARN
82+
service_name: iam
6083
hooks:
6184
delta_pre_compare:
6285
code: customPreCompare(delta, a, b)
@@ -70,6 +93,8 @@ resources:
7093
template_path: hooks/file_system/sdk_update_pre_build_request.go.tpl
7194
sdk_read_many_pre_build_request:
7295
template_path: hooks/file_system/sdk_read_many_pre_build_request.go.tpl
96+
sdk_delete_pre_build_request:
97+
template_path: hooks/file_system/sdk_delete_pre_build_request.go.tpl
7398
print:
7499
add_age_column: true
75100
add_synced_column: true

apis/v1alpha1/types.go

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

apis/v1alpha1/zz_generated.deepcopy.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.

cmd/controller/main.go

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

config/crd/bases/efs.services.k8s.aws_filesystems.yaml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,93 @@ spec:
240240
(https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) in the
241241
Amazon EFS User Guide.
242242
type: number
243+
replicationConfiguration:
244+
description: |-
245+
An array of destination configuration objects. Only one destination configuration
246+
object is supported.
247+
items:
248+
description: |-
249+
Describes the new or existing destination file system for the replication
250+
configuration.
251+
252+
* If you want to replicate to a new file system, do not specify the File
253+
System ID for the destination file system. Amazon EFS creates a new, empty
254+
file system. For One Zone storage, specify the Availability Zone to create
255+
the file system in. To use an Key Management Service key other than the
256+
default KMS key, then specify it. For more information, see Configuring
257+
replication to new Amazon EFS file system (https://docs.aws.amazon.com/efs/latest/ug/create-replication.html)
258+
in the Amazon EFS User Guide. After the file system is created, you cannot
259+
change the KMS key or the performance mode.
260+
261+
* If you want to replicate to an existing file system that's in the same
262+
account as the source file system, then you need to provide the ID or
263+
Amazon Resource Name (ARN) of the file system to which to replicate. The
264+
file system's replication overwrite protection must be disabled. For more
265+
information, see Replicating to an existing file system (https://docs.aws.amazon.com/efs/latest/ug/efs-replication#replicate-existing-destination)
266+
in the Amazon EFS User Guide.
267+
268+
* If you are replicating the file system to a file system that's in a
269+
different account than the source file system (cross-account replication),
270+
you need to provide the ARN for the file system and the IAM role that
271+
allows Amazon EFS to perform replication on the destination account. The
272+
file system's replication overwrite protection must be disabled. For more
273+
information, see Replicating across Amazon Web Services accounts (https://docs.aws.amazon.com/efs/latest/ug/cross-account-replication.html)
274+
in the Amazon EFS User Guide.
275+
properties:
276+
availabilityZoneName:
277+
type: string
278+
fileSystemID:
279+
type: string
280+
fileSystemRef:
281+
description: Reference field for FileSystemID
282+
properties:
283+
from:
284+
description: |-
285+
AWSResourceReference provides all the values necessary to reference another
286+
k8s resource for finding the identifier(Id/ARN/Name)
287+
properties:
288+
name:
289+
type: string
290+
namespace:
291+
type: string
292+
type: object
293+
type: object
294+
kmsKeyID:
295+
type: string
296+
kmsKeyRef:
297+
description: Reference field for KMSKeyID
298+
properties:
299+
from:
300+
description: |-
301+
AWSResourceReference provides all the values necessary to reference another
302+
k8s resource for finding the identifier(Id/ARN/Name)
303+
properties:
304+
name:
305+
type: string
306+
namespace:
307+
type: string
308+
type: object
309+
type: object
310+
region:
311+
type: string
312+
roleARN:
313+
type: string
314+
roleRef:
315+
description: Reference field for RoleARN
316+
properties:
317+
from:
318+
description: |-
319+
AWSResourceReference provides all the values necessary to reference another
320+
k8s resource for finding the identifier(Id/ARN/Name)
321+
properties:
322+
name:
323+
type: string
324+
namespace:
325+
type: string
326+
type: object
327+
type: object
328+
type: object
329+
type: array
243330
tags:
244331
description: |-
245332
Use to create one or more tags associated with the file system. Each tag
@@ -381,6 +468,30 @@ spec:
381468
382469
Regex Pattern: `^(\d{12})|(\d{4}-\d{4}-\d{4})$`
383470
type: string
471+
replicationConfigurationStatus:
472+
description: An array of destination objects. Only one destination
473+
object is supported.
474+
items:
475+
description: Describes the destination file system in the replication
476+
configuration.
477+
properties:
478+
fileSystemID:
479+
type: string
480+
lastReplicatedTimestamp:
481+
format: date-time
482+
type: string
483+
ownerID:
484+
type: string
485+
region:
486+
type: string
487+
roleARN:
488+
type: string
489+
status:
490+
type: string
491+
statusMessage:
492+
type: string
493+
type: object
494+
type: array
384495
sizeInBytes:
385496
description: |-
386497
The latest known metered size (in bytes) of data stored in the file system,

0 commit comments

Comments
 (0)