You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add deployment_id support for multi-deployment (#512)
* chore: add deployment_id config for multi-tenancy support
* test: refactor entity store test suite
* fix: catch unhandled err
* feat: entity store support deployment id
* test: move credentials encryption test out of the suite
* test: move max destination out of suite
* test: deployment isolation
* feat: deployment id support to alert store
* feat: namespace rsmq with deployment id
* chore: makefile
* chore: application integration
* docs: add comments to clarify migration tool
* test: deployment id e2e suite
* fix: remove redis singleton pattern
* docs: config generate
* style: gofmt
* fix: avoid panic
* chore: deployment validation
* chore: include deployment id on startup log
* chore: remove deployment prefix
**Deployment Mode Note:** If you are using `DEPLOYMENT_ID` configuration, this migration is **not needed**. Deployment-scoped keys already include hash tags:
117
+
-`dp_001:tenant:{123}:tenant` (already has hash tags)
118
+
-`dp_001:tenant:{123}:destinations` (already has hash tags)
119
+
120
+
See [001_hash_tags/README.md](./migration/001_hash_tags/README.md) for details.
115
121
116
122
**Safety:** This migration preserves original keys. Use the cleanup command after verification to remove old keys.
Copy file name to clipboardExpand all lines: cmd/outpost-migrate-redis/migration/001_hash_tags/README.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,8 +44,47 @@ After verification, removes all legacy keys:
44
44
- Requires confirmation unless `-force` flag is used
45
45
- Processes deletions in batches of 100 keys
46
46
47
+
## Deployment Mode Compatibility
48
+
49
+
### When This Migration is NOT Needed
50
+
51
+
If you are using the `DEPLOYMENT_ID` configuration option (or `deployment_id` in YAML), **you can skip this migration entirely**. Deployments using deployment IDs already have keys in the correct format:
52
+
53
+
```
54
+
dp_001:tenant:{123}:tenant
55
+
dp_001:tenant:{123}:destinations
56
+
dp_001:tenant:{123}:destination:abc
57
+
```
58
+
59
+
These keys already include hash tags `{123}` and are Redis Cluster compatible.
60
+
61
+
### When This Migration IS Needed
62
+
63
+
This migration is only required for legacy deployments that:
64
+
1. Started before hash tag support was added
65
+
2. Are **NOT** using `DEPLOYMENT_ID` configuration
66
+
3. Have keys in the old format without curly braces:
67
+
```
68
+
tenant:123
69
+
tenant:123:destinations
70
+
tenant:123:destination:abc
71
+
```
72
+
73
+
### Checking If You Need This Migration
74
+
75
+
Run the migration planner to check:
76
+
```bash
77
+
outpost-migrate-redis plan
78
+
```
79
+
80
+
If the output shows `0 tenants to migrate`, your deployment either:
81
+
- Already has hash tags (you're good!)
82
+
- Is using deployment IDs (you're good!)
83
+
- Has no data yet (you're good!)
84
+
47
85
## Notes
48
86
49
87
- Original keys are preserved during Apply phase for rollback safety
50
88
- Migration is idempotent - can be run multiple times safely
51
-
- Skips tenants that are already migrated
89
+
- Skips tenants that are already migrated
90
+
- Does not touch deployment-prefixed keys (e.g., `dp_001:*`)
Copy file name to clipboardExpand all lines: docs/pages/references/configuration.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ Global configurations are provided through env variables or a YAML file. ConfigM
43
43
|`AZURE_SERVICEBUS_TENANT_ID`| Azure Active Directory tenant ID |`nil`| Yes |
44
44
|`DELIVERY_MAX_CONCURRENCY`| Maximum number of delivery attempts to process concurrently. |`1`| No |
45
45
|`DELIVERY_TIMEOUT_SECONDS`| Timeout in seconds for HTTP requests made during event delivery to webhook destinations. |`5`| No |
46
+
|`DEPLOYMENT_ID`| Optional deployment identifier for multi-tenancy. Enables multiple deployments to share the same infrastructure while maintaining data isolation. |`nil`| No |
46
47
|`DESTINATIONS_AWS_KINESIS_METADATA_IN_PAYLOAD`| If true, includes Outpost metadata (event ID, topic, etc.) within the Kinesis record payload. |`true`| No |
47
48
|`DESTINATIONS_INCLUDE_MILLISECOND_TIMESTAMP`| If true, includes a 'timestamp-ms' field with millisecond precision in destination metadata. Useful for load testing and debugging. |`false`| No |
48
49
|`DESTINATIONS_METADATA_PATH`| Path to the directory containing custom destination type definitions. This can be overridden by the root-level 'destination_metadata_path' if also set. |`config/outpost/destinations`| No |
@@ -164,6 +165,9 @@ delivery_max_concurrency: 1
164
165
# Timeout in seconds for HTTP requests made during event delivery to webhook destinations.
165
166
delivery_timeout_seconds: 5
166
167
168
+
# Optional deployment identifier for multi-tenancy. Enables multiple deployments to share the same infrastructure while maintaining data isolation.
169
+
deployment_id: ""
170
+
167
171
# Path to the directory containing custom destination type definitions. Overrides 'destinations.metadata_path' if set.
0 commit comments