diff --git a/charts/victoria-metrics-cluster/CHANGELOG.md b/charts/victoria-metrics-cluster/CHANGELOG.md
index e7f25e340..59eaa74f6 100644
--- a/charts/victoria-metrics-cluster/CHANGELOG.md
+++ b/charts/victoria-metrics-cluster/CHANGELOG.md
@@ -1,8 +1,9 @@
## Next release
- Support extra storageNodes. Fail if no storageNodes set
-- Support enabling automatic discovery of vmstorage addresses using DNS SRV records in enterprise version.
+- Support enabling automatic discovery of vmstorage addresses using DNS SRV records in enterprise version
- Added HPA with scaledown disabled by default
+- Allow excluding vmstorage nodes from vminsert. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1549)
## 0.14.0
diff --git a/charts/victoria-metrics-cluster/README.md b/charts/victoria-metrics-cluster/README.md
index 6ef4d2af3..7055fc949 100644
--- a/charts/victoria-metrics-cluster/README.md
+++ b/charts/victoria-metrics-cluster/README.md
@@ -1254,6 +1254,17 @@ timeoutSeconds: 5
Specify alternative source for env variables
+ |
+
+
+ vminsert.excludeStorageIDs |
+ list |
+
+[]
+
+
+ |
+ IDs of vmstorage nodes to exclude from writing
|
@@ -2374,7 +2385,7 @@ loggerFormat: json
vmselect.name |
string |
-vmselect
+""
|
diff --git a/charts/victoria-metrics-cluster/templates/_helpers.tpl b/charts/victoria-metrics-cluster/templates/_helpers.tpl
index e9b33b851..9347d99ce 100644
--- a/charts/victoria-metrics-cluster/templates/_helpers.tpl
+++ b/charts/victoria-metrics-cluster/templates/_helpers.tpl
@@ -109,9 +109,11 @@ app: {{ $Values.vmauth.name | default "vmauth" }}
{{- else }}
{{- $port := "8400" }}
{{- range $i := until ($storage.replicaCount | int) -}}
- {{- $_ := set $ "appIdx" $i }}
- {{- $storageNode := include "vm.fqdn" $ -}}
- {{- $storageNodes = append $storageNodes (printf "%s:%s" $storageNode $port) -}}
+ {{- if not (has (float64 $i) $app.excludeStorageIDs) -}}
+ {{- $_ := set $ "appIdx" $i }}
+ {{- $storageNode := include "vm.fqdn" $ -}}
+ {{- $storageNodes = append $storageNodes (printf "%s:%s" $storageNode $port) -}}
+ {{- end -}}
{{- end -}}
{{- $_ := unset $ "appIdx" }}
{{- end }}
diff --git a/charts/victoria-metrics-cluster/values.yaml b/charts/victoria-metrics-cluster/values.yaml
index dc5410243..a25814cf3 100644
--- a/charts/victoria-metrics-cluster/values.yaml
+++ b/charts/victoria-metrics-cluster/values.yaml
@@ -342,6 +342,8 @@ vmselect:
vminsert:
# -- Enable deployment of vminsert component. Deployment is used
enabled: true
+ # -- IDs of vmstorage nodes to exclude from writing
+ excludeStorageIDs: []
# -- VMInsert name
name: ""
# -- VMInsert strategy