wso2 / wso2/open-cloud-datacenter

[Task]: Remove deployment sizing. keep per-project quota

Open
#283 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area/Operators Type/Task
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
  1. Delete Autoscale Code: Delete internal/controller/autoscale.go and autoscale_test.go, including helper functions computeEffectivePlan, largerPlan, and planOrder.
  2. Remove PVC Management: Remove RegistryBackendReconciler.ensureStorageSize and harborReleaseSelector (the operator does not manage PVCs).
  3. 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
  1. Preserve Registry.spec.plan: Ensure Registry.spec.plan continues to enforce storage quotas via EnsureProjectQuota and automatically updates on reconcile when modified.
  2. Maintain Quota Mapping: Keep projectQuotaGi allocations unchanged:
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.