Commit e2f49b6
Migrate Redis PVC from gp2 to gp3 across all environments (#1019)
* Add production DB table dump workflow via K8s Job
Introduces a manually-triggered GitHub Actions workflow that spins up a
K8s Job in credreg-prod to pg_dump a specified table, uploads the result
to a dedicated private S3 bucket, and notifies Slack with a 1-hour
presigned download URL.
- New terraform module: db_dumps_s3 (private bucket, AES-256, 7-day expiry)
- IRSA application policy extended with PutObject on cer-db-dumps-prod
- github-oidc-widget gets s3:GetObject for presigned URL generation
- K8s Job template: postgres:16-alpine, uses existing app-secrets for DB creds
- GH Actions workflow: validates table name, creates job, waits, presigns, notifies Slack
* Fix db-table-dump job: mount main-app-config for POSTGRESQL_DATABASE and POSTGRESQL_USERNAME
* Fix db-table-dump: stream via psql COPY to S3, add optional where_clause input, bump deadline to 4h
* Fix Slack notification formatting: proper newlines and hyperlink for presigned URL
* Switch to pg_dump plain SQL format, remove where_clause
* Fix Slack message: rename CSV to SQL dump
* Make db-table-dump fire-and-forget: job handles Slack notifications autonomously
- Dedicated db-dump-service-account with 12h IRSA token expiration
- Job posts started/done/failed to Slack independently
- GH Actions exits after launching job and posting started notification
- Add s3:GetObject to IRSA policy for presigned URL generation from the job
- Add db_dump_service_account_prod to IRSA trust policy
* Simplify: reuse main-app-service-account, drop dedicated dump SA
* Fix variables.tf: restore missing closing brace
* Add dedicated db-dump-service-account with 12h IRSA token for long-running dumps
* Migrate Redis PVC storageClassName from gp2 to gp3 across all envs
Switches Redis StatefulSet volumeClaimTemplates from the deprecated
in-tree aws-ebs provisioner (gp2) to the EBS CSI driver (gp3) in
prod, staging, and sandbox. Reduces EBS force-detach delay on node
failure from ~6min to ~1-2min and eliminates use of the deprecated
kubernetes.io/aws-ebs provisioner.
Live migration was performed for each environment with EBS snapshots
taken as backup before cutover.
---------
Co-authored-by: Ariel Rolfo <arielr-lt+username@users.noreply.github.com>1 parent 9fcccc8 commit e2f49b6
7 files changed
Lines changed: 50 additions & 51 deletions
File tree
- .github/workflows
- terraform
- environments/eks
- k8s-manifests-prod
- k8s-manifests-sandbox
- k8s-manifests-staging
- modules/eks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| |||
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | | - | |
| 54 | + | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 62 | + | |
90 | 63 | | |
91 | 64 | | |
92 | 65 | | |
93 | 66 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 67 | + | |
100 | 68 | | |
101 | 69 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
112 | 74 | | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 25 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
28 | 40 | | |
29 | 41 | | |
30 | 42 | | |
| |||
40 | 52 | | |
41 | 53 | | |
42 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
43 | 64 | | |
44 | 65 | | |
45 | 66 | | |
46 | 67 | | |
47 | 68 | | |
| 69 | + | |
| 70 | + | |
48 | 71 | | |
49 | 72 | | |
50 | 73 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
| |||
0 commit comments