Skip to content

feat: Add annotation to tweak providedThroughput control for tables - #157

Open
pbarsotti-glovo wants to merge 1 commit into
aws-controllers-k8s:mainfrom
pbarsotti-glovo:main
Open

feat: Add annotation to tweak providedThroughput control for tables#157
pbarsotti-glovo wants to merge 1 commit into
aws-controllers-k8s:mainfrom
pbarsotti-glovo:main

Conversation

@pbarsotti-glovo

Copy link
Copy Markdown

Issue 2032.

Description of changes:

Following the line of what was implemented for NodeGroups in this PR, the idea is to allow users to indicate via an annotation if the provisioned throughput of a table is managed by ACK's controller or if an external autoscaler is adapting the capacity dynamically.

In case of external autoscaler, the provisioned throughput defined in the spec is ignored during the delta creation phase to avoid updating these values, which could result in a sudden loss of capacity.

@ack-prow
ack-prow Bot requested review from michaelhtm and rushmash91 October 24, 2025 14:50
@ack-prow

ack-prow Bot commented Oct 24, 2025

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pbarsotti-glovo
Once this PR has been reviewed and has the lgtm label, please assign jlbutler for approval by writing /assign @jlbutler in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 24, 2025
@ack-prow

ack-prow Bot commented Oct 24, 2025

Copy link
Copy Markdown

Hi @pbarsotti-glovo. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@a-hilaly

Copy link
Copy Markdown
Member

/ok-to-test

@ack-prow ack-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 30, 2025
@pbarsotti-glovo

Copy link
Copy Markdown
Author

hey @a-hilaly the codgen diff in the version could be due to my ack_generate_info version?

@knottnt

knottnt commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

For DynamoDB Tables we have multiple fields where provisioned throughput values are defined and can be managed externally. For example, spec.globalSecondaryIndexes, spec.tableReplicas, and tableReplicas.globalSecondaryIndexes can each have their own provisioned throughput values set. Should these fields also all be managed by this annotation as well or do we need more fine-grained control here?

@pbarsotti-glovo

Copy link
Copy Markdown
Author

For DynamoDB Tables we have multiple fields where provisioned throughput values are defined and can be managed externally. For example, spec.globalSecondaryIndexes, spec.tableReplicas, and tableReplicas.globalSecondaryIndexes can each have their own provisioned throughput values set. Should these fields also all be managed by this annotation as well or do we need more fine-grained control here?

I thought that could be better to handle each one independently, although following the same approach. That's why I put Table as part of the annotation, so different ones could be created for the rest of the cases.

@knottnt knottnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pbarsotti-glovo Thanks for the PR! The implementation for ignoring ProvisionedThroughput in the delta looks good. However, there may still be a risk of the ACK controller mutating ProvisionedThroughput if a delta is detected in another spec field. Looking at the EKS NodeGroup implementation we have also added logic to omit the fields from API payloads to avoid that. Can we do something similar here?

https://github.com/aws-controllers-k8s/eks-controller/blob/7a773a9b09751642f0dc7ae2aef234673cb50065/pkg/resource/nodegroup/hook.go#L554

@ack-prow

ack-prow Bot commented Feb 20, 2026

Copy link
Copy Markdown

@pbarsotti-glovo: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
dynamodb-verify-code-gen 505979c link false /test dynamodb-verify-code-gen
dynamodb-crd-compat-check 505979c link true /test dynamodb-crd-compat-check

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants