Skip to content

Commit

Permalink
added autoDiscovery flag to disable SRV records discovery for enterpr…
Browse files Browse the repository at this point in the history
…ise setups
  • Loading branch information
AndrewChubatiuk committed Sep 22, 2024
1 parent 97ae5e1 commit ae04a03
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
10 changes: 10 additions & 0 deletions charts/victoria-metrics-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ Change the values according to the need of the environment in ``victoria-metrics
<th class="helm-vars-description">Description</th>
</thead>
<tbody>
<tr>
<td>autoDiscovery</td>
<td>bool</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="">
<code class="language-yaml">false
</code>
</pre>
</td>
<td></td>
</tr>
<tr>
<td>clusterDomainSuffix</td>
<td>string</td>
Expand Down
6 changes: 3 additions & 3 deletions charts/victoria-metrics-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ app: {{ $Values.vmauth.name | default "vmauth" }}
{{- if and (not $app.suppressStorageFQDNsRender) (and $storage.enabled $storage.replicaCount) }}
{{- $storageNodes := default list }}
{{- $fqdn := include "vm.fqdn" . }}
{{- if eq (include "vm.enterprise.disabled" . ) "false" }}
{{- if and $Values.autoDiscovery (eq (include "vm.enterprise.disabled" . ) "false") }}
{{- $storageNode := printf "srv+_vminsert._tcp.%s" $fqdn }}
{{- $storageNodes = append $storageNodes $storageNode }}
{{- else }}
Expand Down Expand Up @@ -143,7 +143,7 @@ app: {{ $Values.vmauth.name | default "vmauth" }}
{{- if and (not $app.suppressStorageFQDNsRender) (and $storage.enabled $storage.replicaCount) }}
{{- $storageNodes := default list }}
{{- $fqdn := include "vm.fqdn" . }}
{{- if eq (include "vm.enterprise.disabled" . ) "false" }}
{{- if and $Values.autoDiscovery (eq (include "vm.enterprise.disabled" . ) "false") }}
{{- $storageNode := printf "srv+_vmselect._tcp.%s" $fqdn }}
{{- $storageNodes = append $storageNodes $storageNode }}
{{- else }}
Expand All @@ -161,7 +161,7 @@ app: {{ $Values.vmauth.name | default "vmauth" }}
{{- $selectNodes := default list }}
{{- $_ := set . "appKey" "vmselect" }}
{{- $fqdn := include "vm.fqdn" . }}
{{- if eq (include "vm.enterprise.disabled" . ) "false" }}
{{- if and $Values.autoDiscovery (eq (include "vm.enterprise.disabled" . ) "false") }}
{{- $selectNode := printf "srv+_http._tcp.%s" $fqdn }}
{{- $selectNodes = append $selectNodes $selectNode }}
{{- else }}
Expand Down
3 changes: 3 additions & 0 deletions charts/victoria-metrics-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ global:
clusterDomainSuffix: cluster.local
printNotes: true

# use SRV discovery for storageNode and selectNode flags for enterprise version
autoDiscovery: false

rbac:
# -- Enables Role/RoleBinding creation
create: true
Expand Down

0 comments on commit ae04a03

Please sign in to comment.