Skip to content

Commit

Permalink
adds selectNode param for vmselect, (#101)
Browse files Browse the repository at this point in the history
* adds selectNode param for vmselect,
fixes issue #89
  • Loading branch information
f41gh7 committed Dec 22, 2020
1 parent bc040bb commit 6643310
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/victoria-metrics-cluster/Chart.yaml
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: 1.50.2
description: Victoria Metrics Cluster version - high-performance, cost-effective and scalable TSDB, long-term remote storage for Prometheus
name: victoria-metrics-cluster
version: 0.8.7
version: 0.8.8
4 changes: 2 additions & 2 deletions charts/victoria-metrics-cluster/README.md
@@ -1,6 +1,6 @@
# Victoria Metrics Helm Chart for Cluster Version

![Version: 0.8.5](https://img.shields.io/badge/Version-0.8.5-informational?style=flat-square)
![Version: 0.8.8](https://img.shields.io/badge/Version-0.8.8-informational?style=flat-square)

Victoria Metrics Cluster version - high-performance, cost-effective and scalable TSDB, long-term remote storage for Prometheus

Expand Down Expand Up @@ -260,4 +260,4 @@ Change the values according to the need of the environment in ``victoria-metrics
| vmstorage.serviceMonitor.extraLabels | object | `{}` | Service Monitor labels |
| vmstorage.serviceMonitor.namespace | string | `""` | Target namespace of ServiceMonitor manifest |
| vmstorage.terminationGracePeriodSeconds | int | `60` | Pod's termination grace period in seconds |
| vmstorage.tolerations | list | `[]` | Array of tolerations object. Node tolerations for server scheduling to nodes with taints. Ref: [https://kubernetes.io/docs/concepts/configuration/assign-pod-node/](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) |
| vmstorage.tolerations | list | `[]` | Array of tolerations object. Node tolerations for server scheduling to nodes with taints. Ref: [https://kubernetes.io/docs/concepts/configuration/assign-pod-node/](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) |
10 changes: 10 additions & 0 deletions charts/victoria-metrics-cluster/templates/_helpers.tpl
Expand Up @@ -156,6 +156,16 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- end -}}
{{- end -}}

{{- define "victoria-metrics.vmselect.vmselect-pod-fqdn" -}}
{{- $pod := include "victoria-metrics.vmselect.fullname" . -}}
{{- $svc := include "victoria-metrics.vmselect.fullname" . -}}
{{- $namespace := .Release.Namespace -}}
{{- $dnsSuffix := .Values.clusterDomainSuffix -}}
{{- range $i := until (.Values.vmselect.replicaCount | int) -}}
{{- printf "- --selectNode=%s-%d.%s.%s.svc.%s:8481\n" $pod $i $svc $namespace $dnsSuffix -}}
{{- end -}}
{{- end -}}

{{- define "split-host-port" -}}
{{- $hp := split ":" . -}}
{{- printf "%s" $hp._1 -}}
Expand Down
Expand Up @@ -47,6 +47,7 @@ spec:
{{- if not .Values.vmselect.suppresStorageFQDNsRender }}
{{- include "victoria-metrics.vmselect.vmstorage-pod-fqdn" . | nindent 12 }}
{{- end }}
{{- include "victoria-metrics.vmselect.vmselect-pod-fqdn" . | nindent 12 -}}
{{- range $key, $value := .Values.vmselect.extraArgs }}
- --{{ $key }}={{ $value }}
{{- end }}
Expand Down

0 comments on commit 6643310

Please sign in to comment.