From 18eb3cbfeac3f09e4906fc0035842c6734a955ab Mon Sep 17 00:00:00 2001 From: Hugo Shaka Date: Tue, 22 Aug 2023 09:46:33 -0400 Subject: [PATCH] =?UTF-8?q?[buddy]=20=F0=9F=90=9B=20issue=20#30400=20fixin?= =?UTF-8?q?g=20missing=20billing=5Fmode=20param=20in=20teleport-cluster=20?= =?UTF-8?q?helm=20chart=20fo=20dynamodb=20autoscaling=20(#30764)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :bug: issue #30400, dynamodb autoscaling mode requires `billing_mode: provisioned` * Add tests --------- Co-authored-by: Anathan (Ana) Ye --- .../chart/teleport-cluster/templates/auth/_config.aws.tpl | 1 + .../tests/__snapshot__/auth_config_test.yaml.snap | 1 + .../chart/teleport-cluster/tests/auth_config_test.yaml | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/examples/chart/teleport-cluster/templates/auth/_config.aws.tpl b/examples/chart/teleport-cluster/templates/auth/_config.aws.tpl index d0919e77592..9fb08631169 100644 --- a/examples/chart/teleport-cluster/templates/auth/_config.aws.tpl +++ b/examples/chart/teleport-cluster/templates/auth/_config.aws.tpl @@ -13,6 +13,7 @@ continuous_backups: {{ required "aws.backups is required in chart values" .Values.aws.backups }} {{- if .Values.aws.dynamoAutoScaling }} auto_scaling: true + billing_mode: provisioned read_min_capacity: {{ required "aws.readMinCapacity is required when aws.dynamoAutoScaling is true" .Values.aws.readMinCapacity }} read_max_capacity: {{ required "aws.readMaxCapacity is required when aws.dynamoAutoScaling is true" .Values.aws.readMaxCapacity }} read_target_value: {{ required "aws.readTargetValue is required when aws.dynamoAutoScaling is true" .Values.aws.readTargetValue }} diff --git a/examples/chart/teleport-cluster/tests/__snapshot__/auth_config_test.yaml.snap b/examples/chart/teleport-cluster/tests/__snapshot__/auth_config_test.yaml.snap index afda56c39ee..ed8eb560a44 100644 --- a/examples/chart/teleport-cluster/tests/__snapshot__/auth_config_test.yaml.snap +++ b/examples/chart/teleport-cluster/tests/__snapshot__/auth_config_test.yaml.snap @@ -445,6 +445,7 @@ matches snapshot for aws-dynamodb-autoscaling.yaml: - dynamodb://test-dynamodb-auditlog-table audit_sessions_uri: s3://test-s3-session-storage-bucket auto_scaling: true + billing_mode: provisioned continuous_backups: false read_max_capacity: 100 read_min_capacity: 5 diff --git a/examples/chart/teleport-cluster/tests/auth_config_test.yaml b/examples/chart/teleport-cluster/tests/auth_config_test.yaml index d7ddeb2ca00..ea2ed147ccc 100644 --- a/examples/chart/teleport-cluster/tests/auth_config_test.yaml +++ b/examples/chart/teleport-cluster/tests/auth_config_test.yaml @@ -502,3 +502,11 @@ tests: of: ConfigMap - matchSnapshot: path: data.teleport\.yaml + + - it: sets "provisioned" billing mode when autoscaling is enabled + values: + - ../.lint/aws-dynamodb-autoscaling.yaml + asserts: + - matchRegex: + path: data.teleport\.yaml + pattern: 'billing_mode: provisioned'