Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ aliases:
* FEATURE: [vmauth](https://docs.victoriametrics.com/operator/resources/vmauth): previously VMAuth could read configuration only from predefined locations; now VMAuth supports arbitrary filesystem access configuration, allowing users to reference required files directly and reducing configuration workarounds. See [#899](https://github.com/VictoriaMetrics/operator/issues/899).

* BUGFIX: [converter](https://docs.victoriametrics.com/operator/integrations/prometheus/#objects-conversion): disable all prometheus controllers if CRD group was not found. See [#2838](https://github.com/VictoriaMetrics/helm-charts/issues/2838).
* 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 changelog entry is missing required issue/PR reference links mandated by the changelog format.

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

<comment>New changelog entry is missing required issue/PR reference links mandated by the changelog format.</comment>

<file context>
@@ -16,6 +16,7 @@ aliases:
 * FEATURE: [vmauth](https://docs.victoriametrics.com/operator/resources/vmauth): previously VMAuth could read configuration only from predefined locations; now VMAuth supports arbitrary filesystem access configuration, allowing users to reference required files directly and reducing configuration workarounds. See [#899](https://github.com/VictoriaMetrics/operator/issues/899).
 
 * BUGFIX: [converter](https://docs.victoriametrics.com/operator/integrations/prometheus/#objects-conversion): disable all prometheus controllers if CRD group was not found. See [#2838](https://github.com/VictoriaMetrics/helm-charts/issues/2838).
+* 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.69.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.69.0)
</file context>
Fix with Cubic


## [v0.69.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.69.0)
**Release date:** 22 April 2026
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func vmAgentTargetRef(vmAgents []*vmv1beta1.VMAgent, owner *metav1.OwnerReferenc
ref := vmv1beta1.TargetRef{
Name: "write",
URLMapCommon: vmv1beta1.URLMapCommon{
LoadBalancingPolicy: ptr.To("first_available"),
LoadBalancingPolicy: ptr.To("least_loaded"),
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.

I think it needs to be complimented with removing exclude IDs from vmAgentTargetRef, so that we'd be writing in all zones (queues would grow when its being updated)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

vmagent is excluded as well in case if it can be restarted due to upgrade

RetryStatusCodes: []int{500, 502, 503},
},
Paths: []string{"/insert/.+", "/api/v1/write"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ func TestCreateOrUpdate(t *testing.T) {
Kind: "VMAgent",
Objects: vmAgentObjs,
},
URLMapCommon: vmv1beta1.URLMapCommon{
LoadBalancingPolicy: ptr.To("least_loaded"),
},
},
{
Name: "read",
Expand All @@ -423,11 +426,13 @@ func TestCreateOrUpdate(t *testing.T) {
Kind: "VMCluster/vmselect",
Objects: vmClusterObjs,
},
URLMapCommon: vmv1beta1.URLMapCommon{
LoadBalancingPolicy: ptr.To("first_available"),
},
},
}
for i := range targetRefs {
targetRef := &targetRefs[i]
targetRef.LoadBalancingPolicy = ptr.To("first_available")
targetRef.RetryStatusCodes = []int{500, 502, 503}
}
var got vmv1beta1.VMAuth
Expand Down Expand Up @@ -550,6 +555,9 @@ func TestCreateOrUpdate(t *testing.T) {
Kind: "VMAgent",
Objects: vmAgentObjs,
},
URLMapCommon: vmv1beta1.URLMapCommon{
LoadBalancingPolicy: ptr.To("least_loaded"),
},
},
{
Name: "read",
Expand All @@ -558,11 +566,13 @@ func TestCreateOrUpdate(t *testing.T) {
Kind: "VMCluster/vmselect",
Objects: vmClusterObjs,
},
URLMapCommon: vmv1beta1.URLMapCommon{
LoadBalancingPolicy: ptr.To("first_available"),
},
},
}
for i := range targetRefs {
targetRef := &targetRefs[i]
targetRef.LoadBalancingPolicy = ptr.To("first_available")
targetRef.RetryStatusCodes = []int{500, 502, 503}
}
var got vmv1beta1.VMAuth
Expand Down Expand Up @@ -623,14 +633,19 @@ func TestCreateOrUpdate(t *testing.T) {
{
Name: "write",
Paths: []string{"/insert/.+", "/api/v1/write"},
URLMapCommon: vmv1beta1.URLMapCommon{
LoadBalancingPolicy: ptr.To("least_loaded"),
},
},
{
Name: "read",
Paths: []string{"/select/.+", "/admin/tenants"},
URLMapCommon: vmv1beta1.URLMapCommon{
LoadBalancingPolicy: ptr.To("first_available"),
},
},
}
for i := range expectedTargetRefs {
expectedTargetRefs[i].LoadBalancingPolicy = ptr.To("first_available")
expectedTargetRefs[i].RetryStatusCodes = []int{500, 502, 503}
expectedTargetRefs[i].Static = &vmv1beta1.StaticRef{URL: defaultStubAddr}
}
Expand Down
Loading