Skip to content

PR for a next 0.68.x release#2067

Open
AndrewChubatiuk wants to merge 11 commits intorelease-0.68from
release-0.68-next
Open

PR for a next 0.68.x release#2067
AndrewChubatiuk wants to merge 11 commits intorelease-0.68from
release-0.68-next

Conversation

@AndrewChubatiuk
Copy link
Copy Markdown
Contributor

@AndrewChubatiuk AndrewChubatiuk commented Apr 16, 2026

Summary by cubic

Improves volume handling for StatefulSets/DaemonSets and reconciliation reliability: existing volumes are reused by name, parsing errors set status to Failed, metrics are recorded, and OpenShift OLM publishing is migrated to FBC. Internals switch to Kubernetes sets and aggregate errors, opm validates generated FBC catalogs, and VMDistributed defaults write load balancing to least_loaded.

  • New Features

    • Added controllers to convert Prometheus ServiceMonitor, PodMonitor, Probe, PrometheusRule, ScrapeConfig, and AlertmanagerConfig into VM CRs.
    • Unified reconcile error handler across controllers: parsing errors set status to Failed; metrics recorded for parsing/get/conflict errors.
    • Migrated OpenShift bundles to File-based Catalog (FBC): generate catalog/latest/catalog.yaml from templates and bundle, validate with opm, and update operatorhub workflow.
  • Bug Fixes

    • Reuse existing volumes by name for data/cache paths: vmagent (persistent-queue-data), vmcluster (vmstorage-db, vmselect-cachedir), plus VLCluster, VTCluster, VLAgent, VMAnomaly, and VMAlertmanager.
    • StorageSpec.IntoSTSVolume now errors on conflicts and skips creating PVCs/volumes when a same-named volume exists; StorageVolumeMountsTo skips adding volumes in StatefulSet mode (with tests).
    • VMBackup/VMRestore: added acceptEULA; -eula is no longer set by default; ExtraArgs supports flags without values.
    • VMDistributed: default write LoadBalancingPolicy changed to least_loaded (was first_available).

Written for commit 66d4335. Summary will update on new commits.

…2066)

* vmagent/vmcluster/vlcluster/vtcluster/vlagent/vmanomaly/vmalertmanager: use existing volume if it's name matches sts volume claim template

* chore: fetch volume quicker

* test: add tests for StorageVolumeMountsTo

---------

Co-authored-by: Vadim Rutkovsky <vadim@vrutkovs.eu>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 16 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:16">
P2: Custom agent: **Changelog Review Agent**

This entry is an implementation detail that only affects users who name a volume `persistent-queue-data`, so it doesn’t meet the rule’s “majority of users” requirement for changelog entries. Remove it from the changelog.</violation>

<violation number="2" location="docs/CHANGELOG.md:17">
P2: Custom agent: **Changelog Review Agent**

This entry documents a narrow volume-name handling change that only applies to users with `vmstorage-db`/`vmselect-cachedir` volumes, which violates the rule that changelog items must affect the majority of users. Remove it from the changelog.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread docs/CHANGELOG.md
Comment thread docs/CHANGELOG.md
AndrewChubatiuk and others added 4 commits April 17, 2026 10:59
…2036)

* reconcile: properly handle parsing and get errors for prom objects

* test: add tests for ReconcileErrWithStatus

---------

Co-authored-by: Vadim Rutkovsky <vadim@vrutkovs.eu>
* test: run upgrade test every time

* reuse e2e target

---------

Co-authored-by: Andrii Chubatiuk <andrew.chubatiuk@gmail.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found across 35 files (changes from recent commits).

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:16">
P2: Fix the malformed VMSingle example value (`true"`) in the update note; it should be `true`.</violation>

<violation number="2" location="docs/CHANGELOG.md:16">
P1: Custom agent: **Changelog Review Agent**

This new changelog entry does not follow the mandatory format (must start with FEATURE/BUGFIX/SECURITY and include affected services plus references).</violation>
</file>

<file name="internal/controller/operator/controllers.go">

<violation number="1" location="internal/controller/operator/controllers.go:145">
P1: Using a concrete type switch on `err` breaks handling for wrapped `*getError`/`*parsingError`; use `errors.As` so wrapped errors still trigger NotFound handling and metrics paths.</violation>
</file>

<file name="internal/controller/operator/promalertmanagerconfig_controller.go">

<violation number="1" location="internal/controller/operator/promalertmanagerconfig_controller.go:88">
P3: The error log message references the wrong resource type (`VMPodScrape`), which makes troubleshooting reconciliation failures misleading.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

var ge *getError
var pe *parsingError

switch e := err.(type) {
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Using a concrete type switch on err breaks handling for wrapped *getError/*parsingError; use errors.As so wrapped errors still trigger NotFound handling and metrics paths.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At internal/controller/operator/controllers.go, line 145:

<comment>Using a concrete type switch on `err` breaks handling for wrapped `*getError`/`*parsingError`; use `errors.As` so wrapped errors still trigger NotFound handling and metrics paths.</comment>

<file context>
@@ -116,48 +121,54 @@ func (ge *getError) Error() string {
-	var ge *getError
-	var pe *parsingError
+
+	switch e := err.(type) {
+	case *getError:
+		deregisterObjectByCollector(e.requestObject.Name, e.requestObject.Namespace, e.controller)
</file context>
Fix with Cubic

Comment thread docs/CHANGELOG.md Outdated
Comment thread docs/CHANGELOG.md Outdated
Comment thread internal/controller/operator/promalertmanagerconfig_controller.go Outdated
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

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:20">
P1: Custom agent: **Changelog Review Agent**

These changelog entries violate mandatory structure requirements: they omit the required before/now user-impact explanation and contain no issue/PR references (rule sections 3 and 4).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread docs/CHANGELOG.md

* BUGFIX: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): use volume from spec.volumes as persistent queue volume if its name is `persistent-queue-data`, previously emptyDir was mounted. See [#1677](https://github.com/VictoriaMetrics/operator/issues/1677).
* BUGFIX: [vmcluster](https://docs.victoriametrics.com/operator/resources/vmcluster/): use volume from spec.vmstorage.volumes and spec.vmselect.volumes as data and cache volumes if its name is `vmstorage-db` and `vmselect-cachedir` respectively. See [#784](https://github.com/VictoriaMetrics/operator/issues/784).
* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): Improve reconcile error handling for Prometheus and VictoriaMetrics controllers.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Custom agent: Changelog Review Agent

These changelog entries violate mandatory structure requirements: they omit the required before/now user-impact explanation and contain no issue/PR references (rule sections 3 and 4).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/CHANGELOG.md, line 20:

<comment>These changelog entries violate mandatory structure requirements: they omit the required before/now user-impact explanation and contain no issue/PR references (rule sections 3 and 4).</comment>

<file context>
@@ -17,6 +17,8 @@ aliases:
 
 * BUGFIX: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): use volume from spec.volumes as persistent queue volume if its name is `persistent-queue-data`, previously emptyDir was mounted. See [#1677](https://github.com/VictoriaMetrics/operator/issues/1677).
 * BUGFIX: [vmcluster](https://docs.victoriametrics.com/operator/resources/vmcluster/): use volume from spec.vmstorage.volumes and spec.vmselect.volumes as data and cache volumes if its name is `vmstorage-db` and `vmselect-cachedir` respectively. See [#784](https://github.com/VictoriaMetrics/operator/issues/784).
+* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): Improve reconcile error handling for Prometheus and VictoriaMetrics controllers.
+* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): Add acceptEula support for VMBackup/VMRestore.
 
</file context>
Fix with Cubic

@AndrewChubatiuk AndrewChubatiuk force-pushed the release-0.68-next branch 3 times, most recently from 7100a57 to 0166ecf Compare April 17, 2026 13:15
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 8 files (changes from recent commits).

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=".github/workflows/operatorhub.yaml">

<violation number="1" location=".github/workflows/operatorhub.yaml:63">
P1: Verify the downloaded `opm` binary checksum before installing it; the current step executes unverified remote content.</violation>

<violation number="2" location=".github/workflows/operatorhub.yaml:75">
P1: Initialize `PREV_CATALOG` to a valid default before conditional assignment; it is currently used unconditionally and can break the workflow when no prior catalog exists.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

CATALOGS_DIR=__k8s-operatorhub-repo/catalogs
CATALOGS_DIR=__operatorhub-repo/catalogs
NEW_VERSION=$(ls bundle | head -1)
CATALOG_FILE=${CATALOGS_DIR}/latest/victoriametrics-operator/catalog.yaml
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Initialize PREV_CATALOG to a valid default before conditional assignment; it is currently used unconditionally and can break the workflow when no prior catalog exists.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/operatorhub.yaml, line 75:

<comment>Initialize `PREV_CATALOG` to a valid default before conditional assignment; it is currently used unconditionally and can break the workflow when no prior catalog exists.</comment>

<file context>
@@ -48,58 +48,69 @@ jobs:
-          CATALOGS_DIR=__k8s-operatorhub-repo/catalogs
+          CATALOGS_DIR=__operatorhub-repo/catalogs
+          NEW_VERSION=$(ls bundle | head -1)
+          CATALOG_FILE=${CATALOGS_DIR}/latest/victoriametrics-operator/catalog.yaml
+          mkdir -p ${CATALOGS_DIR}/latest/victoriametrics-operator
 
</file context>
Suggested change
CATALOG_FILE=${CATALOGS_DIR}/latest/victoriametrics-operator/catalog.yaml
CATALOG_FILE=${CATALOGS_DIR}/latest/victoriametrics-operator/catalog.yaml
PREV_CATALOG=/dev/null
Fix with Cubic

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not an issue - prior catalog exists

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying—the prior catalog exists, so this isn’t an issue here.

Comment thread .github/workflows/operatorhub.yaml Outdated
Instead of storing errors as strings and joining them use k8s apimachinery's `errors.NewAggregate`
@vrutkovs vrutkovs force-pushed the release-0.68-next branch from a2d452f to 534ef26 Compare April 22, 2026 09:25
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files (changes from recent commits).

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:22">
P2: Custom agent: **Changelog Review Agent**

New tip changelog entry is missing mandatory issue/PR reference links required by the changelog structure rule.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread docs/CHANGELOG.md
* BUGFIX: [vmcluster](https://docs.victoriametrics.com/operator/resources/vmcluster/): use volume from spec.vmstorage.volumes and spec.vmselect.volumes as data and cache volumes if its name is `vmstorage-db` and `vmselect-cachedir` respectively. See [#784](https://github.com/VictoriaMetrics/operator/issues/784).
* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): Improve reconcile error handling for Prometheus and VictoriaMetrics controllers.
* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): Add acceptEula support for VMBackup/VMRestore.
* BUGFIX: [vmdistributed](https://docs.victoriametrics.com/operator/resources/vmdistributed/): change default load balancing policy for write requests from `first_available` to `least_loaded`. This should allow to evenly distribute write load across all VMAgents.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Custom agent: Changelog Review Agent

New tip changelog entry is missing mandatory issue/PR reference links required by the changelog structure rule.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/CHANGELOG.md, line 22:

<comment>New tip changelog entry is missing mandatory issue/PR reference links required by the changelog structure rule.</comment>

<file context>
@@ -19,6 +19,7 @@ aliases:
 * BUGFIX: [vmcluster](https://docs.victoriametrics.com/operator/resources/vmcluster/): use volume from spec.vmstorage.volumes and spec.vmselect.volumes as data and cache volumes if its name is `vmstorage-db` and `vmselect-cachedir` respectively. See [#784](https://github.com/VictoriaMetrics/operator/issues/784).
 * BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): Improve reconcile error handling for Prometheus and VictoriaMetrics controllers.
 * BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): Add acceptEula support for VMBackup/VMRestore.
+* BUGFIX: [vmdistributed](https://docs.victoriametrics.com/operator/resources/vmdistributed/): change default load balancing policy for write requests from `first_available` to `least_loaded`. This should allow to evenly distribute write load across all VMAgents.
 
 ## [v0.68.4](https://github.com/VictoriaMetrics/operator/releases/tag/v0.68.4)
</file context>
Fix with Cubic

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.

2 participants