Skip to content

Add Table update code path #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2023-03-22T21:33:48Z"
build_hash: fa24753ea8b657d8815ae3eac7accd0958f5f9fb
go_version: go1.19
version: v0.25.0
api_directory_checksum: 553eee36730dd0637424a8d9348b37ee90eb594d
build_date: "2023-04-05T21:37:34Z"
build_hash: a6ae2078e57187b2daf47978bc07bd67072d2cba
go_version: go1.20
version: v0.25.0-1-ga6ae207-dirty
api_directory_checksum: 62a4051ba2ded255ad270b491703d3c14440b2c7
api_version: v1alpha1
aws_sdk_go_version: v1.44.93
generator_config_info:
file_checksum: 8b17e0975b403cc552eba69aec5cd03a30956729
file_checksum: 0b7493aa8cdf19370936a973ed31804875d2dfba
original_file_name: generator.yaml
last_modification:
reason: API generation
7 changes: 7 additions & 0 deletions apis/v1alpha1/backup.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 65 additions & 4 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
ignore:
field_paths:
# Replica of Spec.BillingMode
- TableDescription.BillingModeSummary
# Replica of Spec.SSESpecification
- TableDescription.SSEDescription
- TableDescription.TableClassSummary
operations:
UpdateGlobalTable:
operation_type: Delete
Expand All @@ -8,24 +15,42 @@ operations:
resources:
Table:
fields:
GlobalSecondaryIndexesDescriptions:
custom_field:
list_of: GlobalSecondaryIndexDescription
is_read_only: true
TimeToLive:
from:
operation: UpdateTimeToLive
path: TimeToLiveSpecification
AttributeDefinitions:
compare:
is_ignored: true
# non modifiable field
KeySchema:
is_immutable: true
compare:
is_ignored: true
GlobalSecondaryIndexes:
compare:
is_ignored: true
Tags:
compare:
is_ignored: true
AttributeDefinitions:
# non modifiable field
LocalSecondaryIndexes:
is_immutable: true
compare:
is_ignored: true
SSESpecification:
compare:
is_ignored: true
exceptions:
errors:
404:
code: ResourceNotFoundException
terminal_codes:
- InternalServerError
- LimitExceededException
- ResourceInUseException
- InvalidParameter
update_operation:
custom_method_name: customUpdateTable
hooks:
Expand All @@ -43,6 +68,21 @@ resources:
in:
- ACTIVE
- ARCHIVED
print:
add_age_column: true
add_synced_column: true
additional_columns:
- name: ARN
json_path: .status.ackResourceMetadata.arn
type: string
priority: 1
- name: CLASS
json_path: .spec.tableClass
type: string
priority: 0
- name: STATUS
json_path: .status.tableStatus
type: string
GlobalTable:
exceptions:
errors:
Expand Down Expand Up @@ -74,3 +114,24 @@ resources:
in:
- AVAILABLE
- DELETED
print:
add_age_column: true
add_synced_column: true
additional_columns:
- name: ARN
json_path: .status.ackResourceMetadata.arn
type: string
priority: 1
- name: TABLENAME
json_path: .spec.tableName
type: string
priority: 0
- name: TYPE
json_path: .status.backupType
type: string
- name: SIZE
json_path: .status.backupSize
type: string
- name: STATUS
json_path: .status.backupStatus
type: string
16 changes: 7 additions & 9 deletions apis/v1alpha1/table.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 10 additions & 18 deletions apis/v1alpha1/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 11 additions & 35 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 24 additions & 1 deletion config/crd/bases/dynamodb.services.k8s.aws_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,30 @@ spec:
singular: backup
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .status.ackResourceMetadata.arn
name: ARN
priority: 1
type: string
- jsonPath: .status.backupSize
name: SIZE
type: string
- jsonPath: .status.backupStatus
name: STATUS
type: string
- jsonPath: .spec.tableName
name: TABLENAME
type: string
- jsonPath: .status.backupType
name: TYPE
type: string
- jsonPath: .status.conditions[?(@.type=="ACK.ResourceSynced")].status
name: Synced
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: Backup is the Schema for the Backups API
Expand Down
Loading