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 22, 2024
1 parent d8a3a54 commit 8426568
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 28 deletions.
42 changes: 34 additions & 8 deletions charts/victoria-metrics-distributed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,16 @@ Change the values according to the need of the environment in ``victoria-metrics
<code class="language-yaml">{}
</code>
</pre>
</td>
<td></td>
</tr>
<tr>
<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">port: "8427"
</code>
</pre>
</td>
<td><p>Cross zone vmauth spec. Available parameters can be found <a href="https://docs.victoriametrics.com/operator/api/index.html#vmauthspec" target="_blank">here</a></p>
</td>
Expand Down Expand Up @@ -355,6 +365,7 @@ Change the values according to the need of the environment in ``victoria-metrics
<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 @@ -398,7 +409,7 @@ Change the values according to the need of the environment in ``victoria-metrics
<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 @@ -435,10 +446,12 @@ Change the values according to the need of the environment in ``victoria-metrics
retentionPeriod: "14"
vminsert:
extraArgs: {}
port: "8480"
replicaCount: 2
resources: {}
vmselect:
extraArgs: {}
port: "8481"
replicaCount: 2
resources: {}
vmstorage:
Expand Down Expand Up @@ -490,6 +503,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 @@ -522,9 +536,7 @@ vmstorage:
<td>availabilityZones[1].common.spec.topologySpreadConstraints</td>
<td>list</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
<code class="language-yaml">[]
</code>
</pre>
</td>
Expand Down Expand Up @@ -579,7 +591,7 @@ vmstorage:
<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 @@ -614,6 +626,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 @@ -657,7 +670,7 @@ vmstorage:
<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 @@ -694,10 +707,12 @@ vmstorage:
retentionPeriod: "14"
vminsert:
extraArgs: {}
port: "8480"
replicaCount: 2
resources: {}
vmselect:
extraArgs: {}
port: "8481"
replicaCount: 2
resources: {}
vmstorage:
Expand Down Expand Up @@ -749,6 +764,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 @@ -767,6 +783,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 @@ -866,7 +892,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 @@ -929,7 +955,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
41 changes: 28 additions & 13 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)
spec:
Expand All @@ -30,7 +32,8 @@ write:
# -- Override default vmauth name suffix
name: ""
# -- Global write vmauth spec, which can be overriden by each vmauth configuration. Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmauthspec)
spec: {}
spec:
port: "8427"

read:
global:
Expand All @@ -40,7 +43,8 @@ read:
# -- Override default vmauth name suffix
name: ""
# -- Global read vmauth spec, which can be overriden by each vmauth configuration. Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmauthspec)
spec: {}
spec:
port: "8427"

# Config per availability zone components, including vmagent, vmcluster, vmauth etc
availabilityZones:
Expand Down Expand Up @@ -78,6 +82,7 @@ availabilityZones:
name: ""
# -- Write vmauth spec. Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmauthspec)
spec:
port: "8427"
extraArgs:
# vmauth discovers backend IPs via periodic DNS queries,
# and performs load balancing between vminsert instances
Expand All @@ -94,6 +99,7 @@ availabilityZones:
name: ""
# -- Zonal vmauth spec. Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmauthspec)
spec:
port: "8427"
extraArgs:
discoverBackendIPs: "true"
crossZone:
Expand All @@ -103,6 +109,8 @@ availabilityZones:
# -- Override default name suffix
name: ""
# -- Cross zone vmauth spec. Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmauthspec)
spec:
port: "8427"
spec: {}
# vmagent here only meant to proxy write requests to each az,
# doesn't support customized other remote write address.
Expand All @@ -114,7 +122,8 @@ availabilityZones:
# -- VMAgent remote write proxy annotations
annotations: {}
# -- Remote write proxy VMAgent spec. Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmagentspec)
spec: {}
spec:
port: "8429"
vmcluster:
# -- Create VMCluster
enabled: true
Expand All @@ -131,11 +140,12 @@ availabilityZones:
vmselect:
replicaCount: 2
extraArgs: {}
resources:
{}
port: "8481"
resources: {}
vminsert:
replicaCount: 2
extraArgs: {}
port: "8480"
resources: {}
-
# -- Availability zone name
Expand All @@ -157,10 +167,10 @@ availabilityZones:
# values:
# - us-central1-c
# -- Topology spread constraints allows to customize the default topologySpreadConstraints.
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
topologySpreadConstraints: []
# - maxSkew: 1
# topologyKey: kubernetes.io/hostname
# whenUnsatisfiable: ScheduleAnyway
write:
# -- Allow data ingestion to this zone
allow: true
Expand All @@ -171,6 +181,7 @@ availabilityZones:
name: ""
# -- Write vmauth spec. Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmauthspec)
spec:
port: "8427"
extraArgs:
# vmauth discovers backend IPs via periodic DNS queries,
# and performs load balancing between vminsert instances
Expand All @@ -187,6 +198,7 @@ availabilityZones:
name: ""
# -- Zonal vmauth spec. Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmauthspec)
spec:
port: "8427"
extraArgs:
discoverBackendIPs: "true"
crossZone:
Expand All @@ -196,7 +208,8 @@ availabilityZones:
# -- Override default name suffix
name: ""
# -- Cross zone vmauth spec. Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#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 @@ -207,7 +220,8 @@ availabilityZones:
# -- VMAgent remote write proxy annotations
annotations: {}
# -- Remote write proxy VMAgent spec. Available parameters can be found [here](https://docs.victoriametrics.com/operator/api/index.html#vmagentspec)
spec: {}
spec:
port: "8429"
vmcluster:
# -- Create VMCluster
enabled: true
Expand All @@ -224,11 +238,12 @@ availabilityZones:
vmselect:
replicaCount: 2
extraArgs: {}
resources:
{}
port: "8481"
resources: {}
vminsert:
replicaCount: 2
extraArgs: {}
port: "8480"
resources: {}
# add more zones if needed
# - name: zone-na-1
Expand Down

0 comments on commit 8426568

Please sign in to comment.