James
|
16045d5185
|
Mandatory config file for commercial replication (no env vars)
Replication is mandatory in Commercial Edition, configured via
/etc/clavitor/replication.yaml (not env vars or CLI flags).
Changes:
- edition/config.go: LoadReplicationConfig() for commercial - validates YAML
- edition/config_community.go: Community stub returning error
- edition/edition.go: Shared ReplicationConfig type with nested structure
- edition/replication.go: Use new nested config (BackupPOP.URL, etc.)
- edition/backup_mode.go: Fix X-Primary-Location header (TODO: add primary_pop to config)
- cmd/clavitor/main.go: Remove replication-* flags, load from /etc/clavitor/replication.yaml
- go.mod/go.sum: Add gopkg.in/yaml.v3 dependency
Config structure:
pop_id: calgary-01
region: north-america
role: primary # or backup
backup_pop:
id: zurich-01
url: https://zurich-01.clavitor.ai
auth_token_file: /etc/clavitor/replication.key
auth:
token_file: /etc/clavitor/replication.key
Validation:
- pop_id, region, role are required
- primary role requires backup_pop.id and backup_pop.url
- backup role should NOT have backup_pop configured
- Auth token file must exist
Startup behavior:
- Commercial without config: vault refuses to start
- Community: ignores replication, single-node only
Documentation:
- SPEC-replication-config.md: Full config file design
|
2026-04-02 00:56:30 -04:00 |