wso2 / wso2/open-cloud-datacenter
[Task]: Remove deployment sizing. keep per-project quota
Nobody has claimed this yet.
- Dominant language
- HCL
- Stars
- 19
- Forks
- 15
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 4
Description
Description
The operator previously mixed two independent "plan" concepts:
- RegistryBackend.spec.plan: Sized the Harbor deployment itself.
- Registry.spec.plan: Sizes an individual project's storage quota.
Because the operator no longer manages deployment infrastructure, RegistryBackend.spec.plan is obsolete. Removing it resolves a major source of design confusion and eliminates dead code across the operator and documentation.
Acceptance criteria
- Delete Autoscale Code: Delete internal/controller/autoscale.go and autoscale_test.go, including helper functions computeEffectivePlan, largerPlan, and planOrder.
- Remove PVC Management: Remove RegistryBackendReconciler.ensureStorageSize and harborReleaseSelector (the operator does not manage PVCs).
- Purge RegistryBackend Sizing Fields: Remove all backend sizing fields in the CRD (aligned with issue 1) and verify no dead references remain:
- spec.plan
- spec.autoscale
- status.effectivePlan
- status.committedStorageBytes
- status.usedStorageBytes
- status.unlimitedProjectCount
- Preserve Registry.spec.plan: Ensure Registry.spec.plan continues to enforce storage quotas via EnsureProjectQuota and automatically updates on reconcile when modified.
- Maintain Quota Mapping: Keep projectQuotaGi allocations unchanged:
- Update Docs: Update user-facing documentation to reference only the single Registry.spec.plan concept.
Verification
Existing quota-convergence tests pass without errors
Running make manifests produces no diff.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with internal/controller/autoscale.go and autoscale_test.go, then trace RegistryBackendReconciler.ensureStorageSize, harborReleaseSelector, and EnsureProjectQuota. Check the CRD and user-facing documentation for every listed backend sizing field, preserving Registry.spec.plan quota behavior. Run the quota-convergence tests and make manifests; done means no manifest diff and no dead sizing references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- devops, infrastructure
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100