tenancy / multi-tenant

Run multiple websites using the same Laravel installation while keeping tenant specific data separated for fully independent multi-domain setups, previously github.com/hyn/multi-tenant
https://tenancy.dev
MIT License
2.56k stars 394 forks source link

CRD friendly Syncer Implementation #967

Closed weiling61 closed 3 years ago

weiling61 commented 3 years ago

Feature Description Make current Syncer infrastructure code more CRD friendly ---- When users creating their propritory CRD Syncer, they can directly import and reuse most packages in current Syncer.

Proposed behavior Would like to modify current Syncer code to use controller runtime client instead of raw client. This way, no individual scheme needs to be imported into Syncer (mccontroller.go and cluster.go) but let them share a centralized scheme and informer. This facilitates users to create their propritory CRD Syncer and reuse most components of current Syncer infrastructure without any modifications.

Another option to achieve the same objective is to use code generation tool to auto modify import portion of current Syncer infrastructure code.

Current behavior In order to write CRD Syncer, CRD schemes need to be imported in mccontroller.go and cluster.go code. This requires copy of 70% Syncer component code into CRD Syncer code base and get import portion modified, which reduces maintainability of CRD syncer. ..