Skip to content

Commit 23e6d49

Browse files
authored
Modify snapshotRetentionLimit to 0 for cluster creations. (#66)
Issue #, if available: Snapshot window sometimes causes additional snapshotting process during cluster creation which takes additional time. Description of changes: Modify snapshotRetentionLimit to 0 for cluster creations. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent b4e8c29 commit 23e6d49

File tree

5 files changed

+31
-28
lines changed

5 files changed

+31
-28
lines changed

test/e2e/bootstrappable/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Cluster(Bootstrappable):
2626
def create_cluster(self):
2727
mdb = boto3.client("memorydb")
2828
mdb.create_cluster(ClusterName=self.clusterName,
29-
Description='Cluster for Ack snapshot resource testing',
29+
Description='Cluster for Ack snapshot resource testing', SnapshotRetentionLimit=0,
3030
NodeType='db.r6g.large', ACLName='open-access', NumShards=1, NumReplicasPerShard=0)
3131
timeout = time.time() + 30*60 # 30 minutes from now
3232
available_status = "Available"

test/e2e/scenarios/Cluster/cluster_create_update.yaml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -77,29 +77,6 @@ steps:
7777
Description: Test step 2 from ACK
7878
SnsTopicArn: $TOPIC2
7979
MaintenanceWindow: thu:09:00-thu:10:00
80-
- id: "UPDATE_SNAPSHOT_WINDOW_RETENTION_LIMIT"
81-
description: "Update snapshot window and retention limit"
82-
patch:
83-
apiVersion: $CRD_GROUP/$CRD_VERSION
84-
kind: Cluster
85-
metadata:
86-
name: cluster$RANDOM_SUFFIX
87-
spec:
88-
snapshotWindow: 08:00-09:00
89-
snapshotRetentionLimit: 10
90-
wait:
91-
status:
92-
conditions:
93-
ACK.ResourceSynced:
94-
status: "True"
95-
timeout: 3600
96-
expect_k8s:
97-
spec:
98-
snapshotWindow: 08:00-09:00
99-
snapshotRetentionLimit: 10
100-
expect_aws:
101-
SnapshotWindow: 08:00-09:00
102-
SnapshotRetentionLimit: 10
10380
- id: "USER_CREATE"
10481
description: "Create User"
10582
create:
@@ -162,7 +139,7 @@ steps:
162139
conditions:
163140
ACK.ResourceSynced:
164141
status: "True"
165-
timeout: 3600
142+
timeout: 180
166143
expect_k8s:
167144
spec:
168145
aclName: acl$RANDOM_SUFFIX
@@ -213,6 +190,29 @@ steps:
213190
parameterGroupName: pg$RANDOM_SUFFIX
214191
expect_aws:
215192
ParameterGroupName: pg$RANDOM_SUFFIX
193+
- id: "UPDATE_SNAPSHOT_WINDOW_RETENTION_LIMIT"
194+
description: "Update snapshot window and retention limit"
195+
patch:
196+
apiVersion: $CRD_GROUP/$CRD_VERSION
197+
kind: Cluster
198+
metadata:
199+
name: cluster$RANDOM_SUFFIX
200+
spec:
201+
snapshotWindow: 08:00-09:00
202+
snapshotRetentionLimit: 10
203+
wait:
204+
status:
205+
conditions:
206+
ACK.ResourceSynced:
207+
status: "True"
208+
timeout: 3600
209+
expect_k8s:
210+
spec:
211+
snapshotWindow: 08:00-09:00
212+
snapshotRetentionLimit: 10
213+
expect_aws:
214+
SnapshotWindow: 08:00-09:00
215+
SnapshotRetentionLimit: 10
216216
- id: "DELETE_CLUSTER"
217217
description: "Delete the cluster"
218218
delete:

test/e2e/scenarios/Cluster/cluster_terminal_condition.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ steps:
1616
nodeType: cache.t4g.medium
1717
aclName: open-access
1818
numShards: 2
19+
snapshotRetentionLimit: 0
1920
wait:
2021
status:
2122
conditions:

test/e2e/scenarios/Cluster/cluster_update_with_tags.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ steps:
1616
nodeType: db.t4g.small
1717
aclName: open-access
1818
numShards: 1
19+
snapshotRetentionLimit: 0
1920
wait:
2021
status:
2122
conditions:
2223
ACK.ResourceSynced:
2324
status: "True"
24-
timeout: 7200
25+
timeout: 1800
2526
expect_k8s:
2627
spec:
2728
name: cluster$RANDOM_SUFFIX

test/e2e/scenarios/Snapshot/snapshot_update_with_tags.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ steps:
1616
nodeType: db.t4g.small
1717
aclName: open-access
1818
numShards: 1
19+
snapshotRetentionLimit: 0
1920
wait:
2021
status:
2122
conditions:
2223
ACK.ResourceSynced:
2324
status: "True"
24-
timeout: 7200
25+
timeout: 1800
2526
expect_k8s:
2627
spec:
2728
name: cluster$RANDOM_SUFFIX
@@ -42,7 +43,7 @@ steps:
4243
conditions:
4344
ACK.ResourceSynced:
4445
status: "True"
45-
timeout: 3600
46+
timeout: 1800
4647
expect_k8s:
4748
spec:
4849
clusterName: cluster$RANDOM_SUFFIX

0 commit comments

Comments
 (0)