Skip to content

fix(operator): wait for PVC expansion before auto-grow - #368

Draft
bpopadiuk wants to merge 1 commit into
mainfrom
agent/storage-autogrow-inflight-guard
Draft

fix(operator): wait for PVC expansion before auto-grow#368
bpopadiuk wants to merge 1 commit into
mainfrom
agent/storage-autogrow-inflight-guard

Conversation

@bpopadiuk

Copy link
Copy Markdown
Contributor

Codex (GPT-5):

What

Add an in-flight guard to operator-owned PVC auto-growth.

The operator now waits when any matching PVC:

  • requests more storage than status.capacity reports,
  • has no reported capacity yet, or
  • reports FileSystemResizePending=True.

While waiting, it retains the current requested size and reports StorageAutoGrowInProgress with requested/reported sizes and observed usage.

Why

Without this guard, a PVC request could advance from one increment to the next on successive reconciles before the CSI/filesystem expansion completed. A 20 GiB Starter disk under pressure could therefore leap through 30 GiB and 40 GiB toward its cap instead of applying one bounded step at a time.

This is the operator dependency for https://github.com/antflydb/colony/issues/365.

Impact

  • Prevents overlapping auto-grow decisions.
  • Does not shrink storage.
  • Does not alter clusters with auto-grow disabled.
  • Keeps expansion state visible through existing typed status and conditions.

Checks

  • go test ./controllers/antfly -run 'TestReconcile(StorageAutoGrow|PVCExpansion)' -count=1
  • go test ./controllers/antfly -count=1
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant