From 0727325cdf7b8c787f3f44c8b3d26912f2a3004c Mon Sep 17 00:00:00 2001 From: Andrii Chubatiuk Date: Tue, 3 Dec 2024 08:43:46 +0200 Subject: [PATCH] do not set clusterIP for type != ClusterIP --- charts/victoria-logs-single/CHANGELOG.md | 2 +- charts/victoria-logs-single/Chart.yaml | 2 +- .../templates/server-service.yaml | 12 ++++++------ charts/victoria-metrics-cluster/CHANGELOG.md | 2 +- .../victoria-metrics-cluster/templates/service.yaml | 12 ++++++------ charts/victoria-metrics-single/CHANGELOG.md | 2 +- .../templates/server-service.yaml | 12 ++++++------ 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/charts/victoria-logs-single/CHANGELOG.md b/charts/victoria-logs-single/CHANGELOG.md index 844965117..82ebeaa7f 100644 --- a/charts/victoria-logs-single/CHANGELOG.md +++ b/charts/victoria-logs-single/CHANGELOG.md @@ -1,6 +1,6 @@ ## Next release -- TODO +- do not set clusterIP value, when service type is not ClusterIP. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1838) ## 0.8.8 diff --git a/charts/victoria-logs-single/Chart.yaml b/charts/victoria-logs-single/Chart.yaml index 3afa974d7..e877e5f42 100644 --- a/charts/victoria-logs-single/Chart.yaml +++ b/charts/victoria-logs-single/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v1.0.0 description: Victoria Logs Single version - high-performance, cost-effective and scalable logs storage name: victoria-logs-single -version: 0.8.8 +version: 0.8.9 sources: - https://github.com/VictoriaMetrics/helm-charts icon: https://avatars.githubusercontent.com/u/43720803?s=200&v=4 diff --git a/charts/victoria-logs-single/templates/server-service.yaml b/charts/victoria-logs-single/templates/server-service.yaml index fbd82b188..399b49588 100644 --- a/charts/victoria-logs-single/templates/server-service.yaml +++ b/charts/victoria-logs-single/templates/server-service.yaml @@ -14,8 +14,13 @@ metadata: {{- $_ := unset $ctx "extraLabels" }} name: {{ include "vm.plain.fullname" $ctx }} spec: + {{- $type := $service.type }} + {{- if and (not $type) $app.statefulSet.enabled }} + {{- $type = "ClusterIP" }} + {{- end }} + type: {{ $type }} {{- $clusterIP := $service.clusterIP }} - {{- if and (not $clusterIP) $app.statefulSet.enabled }} + {{- if and (not $clusterIP) (eq $type "ClusterIP") $app.statefulSet.enabled }} {{- $clusterIP = "None" }} {{- end }} {{- with $clusterIP }} @@ -30,11 +35,6 @@ spec: {{- with $service.loadBalancerSourceRanges }} loadBalancerSourceRanges: {{ toYaml . | nindent 4 }} {{- end }} - {{- $type := $service.type }} - {{- if and (not $type) $app.statefulSet.enabled }} - {{- $type = "ClusterIP" }} - {{- end }} - type: {{ $type }} {{- with $service.healthCheckNodePort }} healthCheckNodePort: {{ . }} {{- end }} diff --git a/charts/victoria-metrics-cluster/CHANGELOG.md b/charts/victoria-metrics-cluster/CHANGELOG.md index 9cf6de59d..1b7d306b3 100644 --- a/charts/victoria-metrics-cluster/CHANGELOG.md +++ b/charts/victoria-metrics-cluster/CHANGELOG.md @@ -1,6 +1,6 @@ ## Next release -- TODO +- do not set clusterIP value, when service type is not ClusterIP. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1838) ## 0.15.0 diff --git a/charts/victoria-metrics-cluster/templates/service.yaml b/charts/victoria-metrics-cluster/templates/service.yaml index 9053aecdf..7f993a492 100644 --- a/charts/victoria-metrics-cluster/templates/service.yaml +++ b/charts/victoria-metrics-cluster/templates/service.yaml @@ -17,8 +17,13 @@ metadata: name: {{ $fullname }} namespace: {{ include "vm.namespace" $ }} spec: + {{- $type := $service.type }} + {{- if and (not $type) ($app.statefulSet).enabled }} + {{- $type = "ClusterIP" }} + {{- end }} + type: {{ $type }} {{- $clusterIP := $service.clusterIP }} - {{- if and (not $clusterIP) ($app.statefulSet).enabled }} + {{- if and (not $clusterIP) (eq $type "ClusterIP") ($app.statefulSet).enabled }} {{- $clusterIP = "None" }} {{- end }} {{- with $clusterIP }} @@ -33,11 +38,6 @@ spec: {{- with $service.loadBalancerSourceRanges }} loadBalancerSourceRanges: {{ toYaml . | nindent 4 }} {{- end }} - {{- $type := $service.type }} - {{- if and (not $type) ($app.statefulSet).enabled }} - {{- $type = "ClusterIP" }} - {{- end }} - type: {{ $type }} {{- with $service.healthCheckNodePort }} healthCheckNodePort: {{ . }} {{- end }} diff --git a/charts/victoria-metrics-single/CHANGELOG.md b/charts/victoria-metrics-single/CHANGELOG.md index 1d301760a..4bf233186 100644 --- a/charts/victoria-metrics-single/CHANGELOG.md +++ b/charts/victoria-metrics-single/CHANGELOG.md @@ -1,6 +1,6 @@ ## Next release -- TODO +- do not set clusterIP value, when service type is not ClusterIP. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1838) ## 0.13.0 diff --git a/charts/victoria-metrics-single/templates/server-service.yaml b/charts/victoria-metrics-single/templates/server-service.yaml index 68ad9dee4..fa5811778 100644 --- a/charts/victoria-metrics-single/templates/server-service.yaml +++ b/charts/victoria-metrics-single/templates/server-service.yaml @@ -16,8 +16,13 @@ metadata: {{- $_ := unset $ctx "extraLabels" }} name: {{ $fullname }} spec: + {{- $type := $service.type }} + {{- if and (not $type) $app.statefulSet.enabled }} + {{- $type = "ClusterIP" }} + {{- end }} + type: {{ $type }} {{- $clusterIP := $service.clusterIP }} - {{- if and (not $clusterIP) $app.statefulSet.enabled }} + {{- if and (not $clusterIP) (eq $type "ClusterIP") $app.statefulSet.enabled }} {{- $clusterIP = "None" }} {{- end }} {{- with $clusterIP }} @@ -32,11 +37,6 @@ spec: {{- with $service.loadBalancerSourceRanges }} loadBalancerSourceRanges: {{ toYaml . | nindent 4 }} {{- end }} - {{- $type := $service.type }} - {{- if and (not $type) $app.statefulSet.enabled }} - {{- $type = "ClusterIP" }} - {{- end }} - type: {{ $type }} {{- with $service.healthCheckNodePort }} healthCheckNodePort: {{ . }} {{- end }}