Skip to content

Commit a69fd8f

Browse files
committed
Rename to table replicas
1 parent 0185830 commit a69fd8f

17 files changed

+282
-697
lines changed

Diff for: apis/v1alpha1/ack-generate-metadata.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2025-03-21T05:42:15Z"
2+
build_date: "2025-03-22T10:06:29Z"
33
build_hash: 3722729cebe6d3c03c7e442655ef0846f91566a2
44
go_version: go1.24.0
55
version: v0.43.2-7-g3722729
6-
api_directory_checksum: a3ce13b1988591541d32ac56e55b416ff3b6bfc2
6+
api_directory_checksum: cb49386ebd7bb50e2521072a76262c72b9dbd285
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.32.6
99
generator_config_info:
10-
file_checksum: c8721c6d81ac66a3ea6c2b96b784c3da48b798b5
10+
file_checksum: 4533fa8aca3b134b5895ad6ce9a093c3446d99da
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

Diff for: apis/v1alpha1/generator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ operations:
2525
resources:
2626
Table:
2727
fields:
28-
ReplicationGroup:
28+
TableReplicas:
2929
custom_field:
3030
list_of: CreateReplicationGroupMemberAction
3131
compare:

Diff for: apis/v1alpha1/table.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: apis/v1alpha1/zz_generated.deepcopy.go

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: config/crd/bases/dynamodb.services.k8s.aws_tables.yaml

+39-39
Original file line numberDiff line numberDiff line change
@@ -322,45 +322,6 @@ spec:
322322
format: int64
323323
type: integer
324324
type: object
325-
replicationGroup:
326-
items:
327-
description: Represents a replica to be created.
328-
properties:
329-
globalSecondaryIndexes:
330-
items:
331-
description: Represents the properties of a replica global
332-
secondary index.
333-
properties:
334-
indexName:
335-
type: string
336-
provisionedThroughputOverride:
337-
description: |-
338-
Replica-specific provisioned throughput settings. If not specified, uses
339-
the source table's provisioned throughput settings.
340-
properties:
341-
readCapacityUnits:
342-
format: int64
343-
type: integer
344-
type: object
345-
type: object
346-
type: array
347-
kmsMasterKeyID:
348-
type: string
349-
provisionedThroughputOverride:
350-
description: |-
351-
Replica-specific provisioned throughput settings. If not specified, uses
352-
the source table's provisioned throughput settings.
353-
properties:
354-
readCapacityUnits:
355-
format: int64
356-
type: integer
357-
type: object
358-
regionName:
359-
type: string
360-
tableClassOverride:
361-
type: string
362-
type: object
363-
type: array
364325
sseSpecification:
365326
description: Represents the settings used to enable server-side encryption.
366327
properties:
@@ -415,6 +376,45 @@ spec:
415376
The name of the table to create. You can also provide the Amazon Resource
416377
Name (ARN) of the table in this parameter.
417378
type: string
379+
tableReplicas:
380+
items:
381+
description: Represents a replica to be created.
382+
properties:
383+
globalSecondaryIndexes:
384+
items:
385+
description: Represents the properties of a replica global
386+
secondary index.
387+
properties:
388+
indexName:
389+
type: string
390+
provisionedThroughputOverride:
391+
description: |-
392+
Replica-specific provisioned throughput settings. If not specified, uses
393+
the source table's provisioned throughput settings.
394+
properties:
395+
readCapacityUnits:
396+
format: int64
397+
type: integer
398+
type: object
399+
type: object
400+
type: array
401+
kmsMasterKeyID:
402+
type: string
403+
provisionedThroughputOverride:
404+
description: |-
405+
Replica-specific provisioned throughput settings. If not specified, uses
406+
the source table's provisioned throughput settings.
407+
properties:
408+
readCapacityUnits:
409+
format: int64
410+
type: integer
411+
type: object
412+
regionName:
413+
type: string
414+
tableClassOverride:
415+
type: string
416+
type: object
417+
type: array
418418
tags:
419419
description: |-
420420
A list of key-value pairs to label the table. For more information, see Tagging

Diff for: generator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ operations:
2525
resources:
2626
Table:
2727
fields:
28-
ReplicationGroup:
28+
TableReplicas:
2929
custom_field:
3030
list_of: CreateReplicationGroupMemberAction
3131
compare:

Diff for: helm/crds/dynamodb.services.k8s.aws_tables.yaml

+39-39
Original file line numberDiff line numberDiff line change
@@ -326,45 +326,6 @@ spec:
326326
format: int64
327327
type: integer
328328
type: object
329-
replicationGroup:
330-
items:
331-
description: Represents a replica to be created.
332-
properties:
333-
globalSecondaryIndexes:
334-
items:
335-
description: Represents the properties of a replica global
336-
secondary index.
337-
properties:
338-
indexName:
339-
type: string
340-
provisionedThroughputOverride:
341-
description: |-
342-
Replica-specific provisioned throughput settings. If not specified, uses
343-
the source table's provisioned throughput settings.
344-
properties:
345-
readCapacityUnits:
346-
format: int64
347-
type: integer
348-
type: object
349-
type: object
350-
type: array
351-
kmsMasterKeyID:
352-
type: string
353-
provisionedThroughputOverride:
354-
description: |-
355-
Replica-specific provisioned throughput settings. If not specified, uses
356-
the source table's provisioned throughput settings.
357-
properties:
358-
readCapacityUnits:
359-
format: int64
360-
type: integer
361-
type: object
362-
regionName:
363-
type: string
364-
tableClassOverride:
365-
type: string
366-
type: object
367-
type: array
368329
sseSpecification:
369330
description: Represents the settings used to enable server-side encryption.
370331
properties:
@@ -419,6 +380,45 @@ spec:
419380
The name of the table to create. You can also provide the Amazon Resource
420381
Name (ARN) of the table in this parameter.
421382
type: string
383+
tableReplicas:
384+
items:
385+
description: Represents a replica to be created.
386+
properties:
387+
globalSecondaryIndexes:
388+
items:
389+
description: Represents the properties of a replica global
390+
secondary index.
391+
properties:
392+
indexName:
393+
type: string
394+
provisionedThroughputOverride:
395+
description: |-
396+
Replica-specific provisioned throughput settings. If not specified, uses
397+
the source table's provisioned throughput settings.
398+
properties:
399+
readCapacityUnits:
400+
format: int64
401+
type: integer
402+
type: object
403+
type: object
404+
type: array
405+
kmsMasterKeyID:
406+
type: string
407+
provisionedThroughputOverride:
408+
description: |-
409+
Replica-specific provisioned throughput settings. If not specified, uses
410+
the source table's provisioned throughput settings.
411+
properties:
412+
readCapacityUnits:
413+
format: int64
414+
type: integer
415+
type: object
416+
regionName:
417+
type: string
418+
tableClassOverride:
419+
type: string
420+
type: object
421+
type: array
422422
tags:
423423
description: |-
424424
A list of key-value pairs to label the table. For more information, see Tagging

Diff for: pkg/resource/table/hooks.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ func (rm *resourceManager) customUpdateTable(
233233
}
234234
return nil, err
235235
}
236-
case delta.DifferentAt("Spec.ReplicationGroup"):
236+
case delta.DifferentAt("Spec.TableReplicas"):
237237
if !hasStreamSpecificationWithNewAndOldImages(desired) {
238238
msg := "table must have DynamoDB Streams enabled with StreamViewType set to NEW_AND_OLD_IMAGES for replica updates"
239239
rlog.Debug(msg)
@@ -243,7 +243,7 @@ func (rm *resourceManager) customUpdateTable(
243243
if !canUpdateTableReplicas(latest) {
244244
return nil, requeueWaitReplicasActive
245245
}
246-
if err := rm.syncReplicaUpdates(ctx, latest, desired); err != nil {
246+
if err := rm.syncReplicas(ctx, latest, desired); err != nil {
247247
return nil, err
248248
}
249249
}
@@ -581,11 +581,11 @@ func customPreCompare(
581581
}
582582

583583
// Handle ReplicaUpdates API comparison
584-
if len(a.ko.Spec.ReplicationGroup) != len(b.ko.Spec.ReplicationGroup) {
585-
delta.Add("Spec.ReplicationGroup", a.ko.Spec.ReplicationGroup, b.ko.Spec.ReplicationGroup)
586-
} else if a.ko.Spec.ReplicationGroup != nil && b.ko.Spec.ReplicationGroup != nil {
587-
if !equalReplicaArrays(a.ko.Spec.ReplicationGroup, b.ko.Spec.ReplicationGroup) {
588-
delta.Add("Spec.ReplicationGroup", a.ko.Spec.ReplicationGroup, b.ko.Spec.ReplicationGroup)
584+
if len(a.ko.Spec.TableReplicas) != len(b.ko.Spec.TableReplicas) {
585+
delta.Add("Spec.TableReplicas", a.ko.Spec.TableReplicas, b.ko.Spec.TableReplicas)
586+
} else if a.ko.Spec.TableReplicas != nil && b.ko.Spec.TableReplicas != nil {
587+
if !equalReplicaArrays(a.ko.Spec.TableReplicas, b.ko.Spec.TableReplicas) {
588+
delta.Add("Spec.TableReplicas", a.ko.Spec.TableReplicas, b.ko.Spec.TableReplicas)
589589
}
590590
}
591591

0 commit comments

Comments
 (0)