Skip to content

Commit

Permalink
updated ports and urls
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Sep 23, 2024
1 parent a7e2630 commit d4bc969
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 23 deletions.
30 changes: 24 additions & 6 deletions charts/victoria-metrics-distributed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ topologySpreadConstraints:
<td>availabilityZones[0].read.crossZone.vmauth.spec</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">{}
<code class="language-yaml">port: "8427"
</code>
</pre>
</td>
Expand Down Expand Up @@ -339,6 +339,7 @@ topologySpreadConstraints:
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">extraArgs:
discoverBackendIPs: "true"
port: "8427"
</code>
</pre>
</td>
Expand Down Expand Up @@ -382,7 +383,7 @@ topologySpreadConstraints:
<td>availabilityZones[0].vmagent.spec</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">{}
<code class="language-yaml">port: "8429"
</code>
</pre>
</td>
Expand Down Expand Up @@ -419,10 +420,12 @@ topologySpreadConstraints:
retentionPeriod: "14"
vminsert:
extraArgs: {}
port: "8480"
replicaCount: 2
resources: {}
vmselect:
extraArgs: {}
port: "8481"
replicaCount: 2
resources: {}
vmstorage:
Expand Down Expand Up @@ -474,6 +477,7 @@ vmstorage:
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">extraArgs:
discoverBackendIPs: "true"
port: "8427"
</code>
</pre>
</td>
Expand Down Expand Up @@ -545,7 +549,7 @@ topologySpreadConstraints:
<td>availabilityZones[1].read.crossZone.vmauth.spec</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">{}
<code class="language-yaml">port: "8427"
</code>
</pre>
</td>
Expand Down Expand Up @@ -580,6 +584,7 @@ topologySpreadConstraints:
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">extraArgs:
discoverBackendIPs: "true"
port: "8427"
</code>
</pre>
</td>
Expand Down Expand Up @@ -623,7 +628,7 @@ topologySpreadConstraints:
<td>availabilityZones[1].vmagent.spec</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">{}
<code class="language-yaml">port: "8429"
</code>
</pre>
</td>
Expand Down Expand Up @@ -660,10 +665,12 @@ topologySpreadConstraints:
retentionPeriod: "14"
vminsert:
extraArgs: {}
port: "8480"
replicaCount: 2
resources: {}
vmselect:
extraArgs: {}
port: "8481"
replicaCount: 2
resources: {}
vmstorage:
Expand Down Expand Up @@ -715,6 +722,7 @@ vmstorage:
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">extraArgs:
discoverBackendIPs: "true"
port: "8427"
</code>
</pre>
</td>
Expand All @@ -733,6 +741,16 @@ vmstorage:
<td><p>Common VMAgent spec, which can be overriden by each VMAgent configuration. Available parameters can be found <a href="https://docs.victoriametrics.com/operator/api/index.html#vmagentspec" target="_blank">here</a></p>
</td>
</tr>
<tr>
<td>common.vmauth.spec</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">{}
</code>
</pre>
</td>
<td></td>
</tr>
<tr>
<td>common.vmcluster.spec</td>
<td>object</td>
Expand Down Expand Up @@ -832,7 +850,7 @@ spec:
<td>read.global.vmauth.spec</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">{}
<code class="language-yaml">port: "8427"
</code>
</pre>
</td>
Expand Down Expand Up @@ -895,7 +913,7 @@ vmsingle:
<td>write.global.vmauth.spec</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">{}
<code class="language-yaml">port: "8427"
</code>
</pre>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
name: {{ .Values.extraVMAgent.name }}
namespace: {{ include "vm.namespace" . }}
{{- $spec := (deepCopy .Values.extraVMAgent.spec) }}
{{- $remoteWrites := list (dict "url" (printf "%s/prometheus/api/v1/write" (include "vm.url" $ctx))) }}
{{- $remoteWrites := list (dict "url" (printf "%s/prometheus/api/v1/write" (trimSuffix "/" (include "vm.url" $ctx)))) }}
{{- $_ := set $spec "remoteWrite" (concat $remoteWrites ($spec.remoteWrite | default list)) }}
spec: {{ tpl (toYaml $spec) . | nindent 2 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ if and .Values.read.global.vmauth.enabled (index .Values "victoria-metrics-k8s-stack" "grafana" "enabled") }}
{{- $ctx := dict "helm" . "appKey" (list "read" "global" "vmauth") "prefix" "read-global" "style" "managed" }}
{{- $url := (printf "%s/select/0/prometheus/" (include "vm.url" $ctx)) }}
{{- $url := (printf "%s/select/0/prometheus/" (trimSuffix "/" (include "vm.url" $ctx))) }}
---
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
{{- with $zone.read.perZone.vmauth.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
{{- $spec := mergeOverwrite (deepCopy (($zone.common).spec)) (deepCopy (((($zone.read).perZone).vmauth).spec)) }}
{{- $spec := mergeOverwrite (deepCopy $.Values.common.vmauth.spec) (deepCopy (($zone.common).spec)) (deepCopy (((($zone.read).perZone).vmauth).spec)) }}
spec: {{ toYaml (omit $spec "unauthorizedAccessConfig") | nindent 2 }}
unauthorizedAccessConfig:
- src_paths:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
{{- with $zone.read.crossZone.vmauth.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
{{- $spec := mergeOverwrite (deepCopy (($zone.common).spec)) (deepCopy (((($zone.read).crossZone).vmauth).spec)) }}
{{- $spec := mergeOverwrite (deepCopy $.Values.common.vmauth.spec) (deepCopy (($zone.common).spec)) (deepCopy (((($zone.read).crossZone).vmauth).spec)) }}
spec: {{ toYaml (omit $spec "unauthorizedAccessConfig") | nindent 2 }}
unauthorizedAccessConfig:
- src_paths:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
{{- $spec := $zone.spec | default dict }}
{{- $spec = merge (deepCopy $spec) (deepCopy $zone.write.vmauth.spec) }}
{{- $spec = merge (deepCopy $.Values.common.vmauth.spec) (deepCopy $spec) (deepCopy $zone.write.vmauth.spec) }}
spec: {{ toYaml (omit $spec "unauthorizedAccessConfig") | nindent 2 }}
{{- $_ := set $ctx "style" "managed" }}
{{- $_ := set $ctx "appKey" (list "availabilityZones" $i "vmcluster" "spec" "vminsert") }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- $spec := .Values.read.global.vmauth.spec }}
{{- $spec := mergeOverwrite (deepCopy .Values.common.vmauth.spec) (deepCopy .Values.read.global.vmauth.spec) }}
spec:
{{- with (omit $spec "unauthorizedAccessConfig") }}
{{- toYaml . | nindent 2 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- with .Values.write.global.vmauth.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
{{- $spec := .Values.write.global.vmauth.spec }}
{{- $spec := mergeOverwrite (deepCopy .Values.common.vmauth.spec) (deepCopy .Values.write.global.vmauth.spec) }}
spec:
{{- with (omit $spec "unauthorizedAccessConfig") }}
{{- toYaml . | nindent 2 }}
Expand Down
34 changes: 24 additions & 10 deletions charts/victoria-metrics-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ fullnameOverride: ""
global: {}

common:
vmauth:
spec: {}
vmagent:
# -- Common VMAgent spec, which can be overriden by each VMAgent configuration.
# Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmagentspec)
Expand All @@ -32,7 +34,8 @@ write:
# -- Override the name of the vmauth object
name: ""
# -- Spec for VMAuth CRD, see [here](https://docs.victoriametrics.com/operator/api#vmauthspec)
spec: {}
spec:
port: "8427"

read:
global:
Expand All @@ -42,7 +45,8 @@ read:
# -- Override the name of the vmauth object
name: ""
# -- Spec for VMAuth CRD, see [here](https://docs.victoriametrics.com/operator/api#vmauthspec)
spec: {}
spec:
port: "8427"

# Config per availability zone components, including vmagent, vmcluster, vmauth etc
availabilityZones:
Expand Down Expand Up @@ -80,6 +84,7 @@ availabilityZones:
name: ""
# -- Spec for VMAuth CRD, see [here](https://docs.victoriametrics.com/operator/api#vmauthspec)
spec:
port: "8427"
extraArgs:
# vmauth discovers backend IPs via periodic DNS queries,
# and performs load balancing between vminsert instances
Expand All @@ -96,6 +101,7 @@ availabilityZones:
name: ""
# -- Spec for VMAuth CRD, see [here](https://docs.victoriametrics.com/operator/api#vmauthspec)
spec:
port: "8427"
extraArgs:
discoverBackendIPs: "true"
crossZone:
Expand All @@ -105,7 +111,8 @@ availabilityZones:
# -- Override the name of the vmauth object
name: ""
# -- Spec for VMAuth CRD, see [here](https://docs.victoriametrics.com/operator/api#vmauthspec)
spec: {}
spec:
port: "8427"
# vmagent here only meant to proxy write requests to each az,
# doesn't support customized other remote write address.
vmagent:
Expand All @@ -116,7 +123,8 @@ availabilityZones:
# -- VMAgent remote write proxy annotations
annotations: {}
# -- Spec for VMAgent CRD, see [here](https://docs.victoriametrics.com/operator/api#vmagentspec)
spec: {}
spec:
port: "8429"
vmcluster:
# -- Create VMCluster
enabled: true
Expand All @@ -133,11 +141,12 @@ availabilityZones:
vmselect:
replicaCount: 2
extraArgs: {}
resources:
{}
port: "8481"
resources: {}
vminsert:
replicaCount: 2
extraArgs: {}
port: "8480"
resources: {}
-
# -- Availability zone name
Expand Down Expand Up @@ -173,6 +182,7 @@ availabilityZones:
name: ""
# -- Spec for VMAuth CRD, see [here](https://docs.victoriametrics.com/operator/api#vmauthspec)
spec:
port: "8427"
extraArgs:
# vmauth discovers backend IPs via periodic DNS queries,
# and performs load balancing between vminsert instances
Expand All @@ -189,6 +199,7 @@ availabilityZones:
name: ""
# -- Spec for VMAuth CRD, see [here](https://docs.victoriametrics.com/operator/api#vmauthspec)
spec:
port: "8427"
extraArgs:
discoverBackendIPs: "true"
crossZone:
Expand All @@ -198,7 +209,8 @@ availabilityZones:
# -- Override the name of the vmauth object
name: ""
# -- Spec for VMAuth CRD, see [here](https://docs.victoriametrics.com/operator/api#vmauthspec)
spec: {}
spec:
port: "8427"
# vmagent here only meant to proxy write requests to each az,
# doesn't support customized other remote write address.
vmagent:
Expand All @@ -209,7 +221,8 @@ availabilityZones:
# -- VMAgent remote write proxy annotations
annotations: {}
# -- Spec for VMAgent CRD, see [here](https://docs.victoriametrics.com/operator/api#vmagentspec)
spec: {}
spec:
port: "8429"
vmcluster:
# -- Create VMCluster
enabled: true
Expand All @@ -226,11 +239,12 @@ availabilityZones:
vmselect:
replicaCount: 2
extraArgs: {}
resources:
{}
port: "8481"
resources: {}
vminsert:
replicaCount: 2
extraArgs: {}
port: "8480"
resources: {}


Expand Down

0 comments on commit d4bc969

Please sign in to comment.