Skip to content

Commit a048d49

Browse files
committed
Add dynamodb table updates
Signed-off-by: Amine Hilaly <[email protected]>
1 parent 7254006 commit a048d49

36 files changed

+2487
-812
lines changed
+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2023-03-22T21:33:48Z"
3-
build_hash: fa24753ea8b657d8815ae3eac7accd0958f5f9fb
4-
go_version: go1.19
5-
version: v0.25.0
6-
api_directory_checksum: 553eee36730dd0637424a8d9348b37ee90eb594d
2+
build_date: "2023-04-05T13:42:50Z"
3+
build_hash: a6ae2078e57187b2daf47978bc07bd67072d2cba
4+
go_version: go1.20
5+
version: v0.25.0-1-ga6ae207-dirty
6+
api_directory_checksum: 62a4051ba2ded255ad270b491703d3c14440b2c7
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.93
99
generator_config_info:
10-
file_checksum: 8b17e0975b403cc552eba69aec5cd03a30956729
10+
file_checksum: c80e7b511e459f5ac0d02092e5b2319076373935
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/backup.go

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

apis/v1alpha1/generator.yaml

+62-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
ignore:
2+
field_paths:
3+
# Replica of Spec.BillingMode
4+
- TableDescription.BillingModeSummary
5+
# Replica of Spec.SSESpecification
6+
- TableDescription.SSEDescription
7+
- TableDescription.TableClassSummary
18
operations:
29
UpdateGlobalTable:
310
operation_type: Delete
@@ -8,24 +15,39 @@ operations:
815
resources:
916
Table:
1017
fields:
18+
GlobalSecondaryIndexesDescriptions:
19+
custom_field:
20+
list_of: GlobalSecondaryIndexDescription
21+
is_read_only: true
1122
TimeToLive:
1223
from:
1324
operation: UpdateTimeToLive
1425
path: TimeToLiveSpecification
26+
AttributeDefinitions:
27+
compare:
28+
is_ignored: true
29+
# non modifiable field
30+
KeySchema:
31+
compare:
32+
is_immutable: true
33+
is_ignored: true
34+
GlobalSecondaryIndexes:
35+
compare:
36+
is_ignored: true
1537
Tags:
1638
compare:
1739
is_ignored: true
18-
AttributeDefinitions:
40+
# non modifiable field
41+
LocalSecondaryIndexes:
42+
is_immutable: true
1943
compare:
2044
is_ignored: true
2145
exceptions:
2246
errors:
2347
404:
2448
code: ResourceNotFoundException
2549
terminal_codes:
26-
- InternalServerError
27-
- LimitExceededException
28-
- ResourceInUseException
50+
- InvalidParameter
2951
update_operation:
3052
custom_method_name: customUpdateTable
3153
hooks:
@@ -43,6 +65,21 @@ resources:
4365
in:
4466
- ACTIVE
4567
- ARCHIVED
68+
print:
69+
add_age_column: true
70+
add_synced_column: true
71+
additional_columns:
72+
- name: ARN
73+
json_path: .status.ackResourceMetadata.arn
74+
type: string
75+
priority: 1
76+
- name: CLASS
77+
json_path: .spec.tableClass
78+
type: string
79+
priority: 0
80+
- name: STATUS
81+
json_path: .status.tableStatus
82+
type: string
4683
GlobalTable:
4784
exceptions:
4885
errors:
@@ -74,3 +111,24 @@ resources:
74111
in:
75112
- AVAILABLE
76113
- DELETED
114+
print:
115+
add_age_column: true
116+
add_synced_column: true
117+
additional_columns:
118+
- name: ARN
119+
json_path: .status.ackResourceMetadata.arn
120+
type: string
121+
priority: 1
122+
- name: TABLENAME
123+
json_path: .spec.tableName
124+
type: string
125+
priority: 0
126+
- name: TYPE
127+
json_path: .status.backupType
128+
type: string
129+
- name: SIZE
130+
json_path: .status.backupSize
131+
type: string
132+
- name: STATUS
133+
json_path: .status.backupStatus
134+
type: string

apis/v1alpha1/table.go

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

apis/v1alpha1/types.go

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

apis/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/dynamodb.services.k8s.aws_backups.yaml

+24-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,30 @@ spec:
1515
singular: backup
1616
scope: Namespaced
1717
versions:
18-
- name: v1alpha1
18+
- additionalPrinterColumns:
19+
- jsonPath: .status.ackResourceMetadata.arn
20+
name: ARN
21+
priority: 1
22+
type: string
23+
- jsonPath: .status.backupSize
24+
name: SIZE
25+
type: string
26+
- jsonPath: .status.backupStatus
27+
name: STATUS
28+
type: string
29+
- jsonPath: .spec.tableName
30+
name: TABLENAME
31+
type: string
32+
- jsonPath: .status.backupType
33+
name: TYPE
34+
type: string
35+
- jsonPath: .status.conditions[?(@.type=="ACK.ResourceSynced")].status
36+
name: Synced
37+
type: string
38+
- jsonPath: .metadata.creationTimestamp
39+
name: Age
40+
type: date
41+
name: v1alpha1
1942
schema:
2043
openAPIV3Schema:
2144
description: Backup is the Schema for the Backups API

0 commit comments

Comments
 (0)