reconcile: updated conditions for STS recreate#1925
Merged
AndrewChubatiuk merged 1 commit intomasterfrom Mar 4, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/CHANGELOG.md">
<violation number="1" location="docs/CHANGELOG.md:28">
P1: Custom agent: **Changelog Review Agent**
These new BUGFIX entries violate the changelog mandatory structure by missing required issue/PR references.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
docs/CHANGELOG.md
Outdated
| * BUGFIX: [vmdistributed](https://docs.victoriametrics.com/operator/resources/vmdistributed/): fix PVC being owned by StatefulSet and top-level object simultaenously. See [#1845](https://github.com/VictoriaMetrics/operator/issues/1845). | ||
| * BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): remove unneeded finalizer from core K8s resources. See [#835](https://github.com/VictoriaMetrics/operator/issues/835). | ||
| * BUGFIX: [vmdistributed](https://docs.victoriametrics.com/operator/resources/vmdistributed/): remove finalizers from VMServiceScrape and VMPodScrape objects, and keep finalizers on VMAgent, VMCluster, and VMAuth when DeletionTimestamp is not empty. | ||
| * BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): recreate STS only if PVC immutable fields were changed or PVC size was decreased, before any PVC spec change led to STS recreation. |
Contributor
There was a problem hiding this comment.
P1: Custom agent: Changelog Review Agent
These new BUGFIX entries violate the changelog mandatory structure by missing required issue/PR references.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/CHANGELOG.md, line 28:
<comment>These new BUGFIX entries violate the changelog mandatory structure by missing required issue/PR references.</comment>
<file context>
@@ -25,6 +25,8 @@ aliases:
* BUGFIX: [vmdistributed](https://docs.victoriametrics.com/operator/resources/vmdistributed/): fix PVC being owned by StatefulSet and top-level object simultaenously. See [#1845](https://github.com/VictoriaMetrics/operator/issues/1845).
* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): remove unneeded finalizer from core K8s resources. See [#835](https://github.com/VictoriaMetrics/operator/issues/835).
* BUGFIX: [vmdistributed](https://docs.victoriametrics.com/operator/resources/vmdistributed/): remove finalizers from VMServiceScrape and VMPodScrape objects, and keep finalizers on VMAgent, VMCluster, and VMAuth when DeletionTimestamp is not empty.
+* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): recreate STS only if PVC immutable fields were changed or PVC size was decreased, before any PVC spec change led to STS recreation.
+* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): wait for STS deletion in case of recreation without throwing an error.
</file context>
vrutkovs
reviewed
Mar 4, 2026
internal/controller/operator/factory/reconcile/statefulset_pvc_expand.go
Outdated
Show resolved
Hide resolved
3eb934d to
f165aeb
Compare
vrutkovs
approved these changes
Mar 4, 2026
f165aeb to
bee5dc2
Compare
Merged
c2761b4 to
082385b
Compare
Contributor
There was a problem hiding this comment.
1 issue found across 6 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/CHANGELOG.md">
<violation number="1" location="docs/CHANGELOG.md:28">
P1: Custom agent: **Changelog Review Agent**
Both new BUGFIX entries violate the required changelog structure because they do not include issue/PR references, which are mandatory.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| * BUGFIX: [vmdistributed](https://docs.victoriametrics.com/operator/resources/vmdistributed/): fix PVC being owned by StatefulSet and top-level object simultaenously. See [#1845](https://github.com/VictoriaMetrics/operator/issues/1845). | ||
| * BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): remove unneeded finalizer from core K8s resources. See [#835](https://github.com/VictoriaMetrics/operator/issues/835). | ||
| * BUGFIX: [vmdistributed](https://docs.victoriametrics.com/operator/resources/vmdistributed/): remove finalizers from VMServiceScrape and VMPodScrape objects, and keep finalizers on VMAgent, VMCluster, and VMAuth when DeletionTimestamp is not empty. | ||
| * BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): do not recreate STS if VCT size was increased and recreate in other cases. |
Contributor
There was a problem hiding this comment.
P1: Custom agent: Changelog Review Agent
Both new BUGFIX entries violate the required changelog structure because they do not include issue/PR references, which are mandatory.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/CHANGELOG.md, line 28:
<comment>Both new BUGFIX entries violate the required changelog structure because they do not include issue/PR references, which are mandatory.</comment>
<file context>
@@ -25,6 +25,8 @@ aliases:
* BUGFIX: [vmdistributed](https://docs.victoriametrics.com/operator/resources/vmdistributed/): fix PVC being owned by StatefulSet and top-level object simultaenously. See [#1845](https://github.com/VictoriaMetrics/operator/issues/1845).
* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): remove unneeded finalizer from core K8s resources. See [#835](https://github.com/VictoriaMetrics/operator/issues/835).
* BUGFIX: [vmdistributed](https://docs.victoriametrics.com/operator/resources/vmdistributed/): remove finalizers from VMServiceScrape and VMPodScrape objects, and keep finalizers on VMAgent, VMCluster, and VMAuth when DeletionTimestamp is not empty.
+* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): do not recreate STS if VCT size was increased and recreate in other cases.
+* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): wait for STS deletion in case of recreation without throwing an error.
</file context>
082385b to
ed53c0f
Compare
* do not recreate STS if VCT size was increased decreased and recreate in other cases * do not throw error on STS recreation
ed53c0f to
10d4737
Compare
AndrewChubatiuk
added a commit
that referenced
this pull request
Mar 4, 2026
* do not recreate STS if VCT size was increased decreased and recreate in other cases * do not throw error on STS recreation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by cubic
Refined StatefulSet recreation: we recreate when VCT spec/metadata or other immutable fields change; we expand PVCs in place on size increase, while downsizing still recreates. Recreation waits for deletion with orphaned pods and returns clearer, namespaced errors.
Written for commit 10d4737. Summary will update on new commits.