From 28ce16ea4c5d3c3becab396019af53486127be11 Mon Sep 17 00:00:00 2001 From: tangyatsu Date: Fri, 14 Feb 2025 14:15:45 +0300 Subject: [PATCH] [perforator][helm] rename host override field to make it clearer commit_hash:a5503422c0fbf677575951ae4909f4ef16b0502d --- .../kubernetes/helm/perforator/templates/_helpers.tpl | 9 ++++++--- perforator/deploy/kubernetes/helm/perforator/values.yaml | 9 +++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/perforator/deploy/kubernetes/helm/perforator/templates/_helpers.tpl b/perforator/deploy/kubernetes/helm/perforator/templates/_helpers.tpl index ab46104b..bdca5a99 100644 --- a/perforator/deploy/kubernetes/helm/perforator/templates/_helpers.tpl +++ b/perforator/deploy/kubernetes/helm/perforator/templates/_helpers.tpl @@ -261,7 +261,8 @@ Return the path to the CA cert file signing the perforator storage cert. */}} {{- define "perforator.storage.host" -}} -{{ .Values.storage.hostname | default (printf "%s:%v" (include "perforator.storage.service.name" .) .Values.storage.service.ports.grpc.port) }} +{{- $hostNameOverride := coalesce .Values.agent.config.storageHostnameOverride .Values.storage.hostname -}} +{{ $hostNameOverride | default (printf "%s:%v" (include "perforator.storage.service.name" .) .Values.storage.service.ports.grpc.port) }} {{- end }} {{- define "perforator.storage.service.name" -}} @@ -273,11 +274,13 @@ Return the path to the CA cert file signing the perforator storage cert. */}} {{- define "perforator.proxy.host.http" -}} -{{ .Values.proxy.hostname | default (printf "%s:%v" (include "perforator.proxy.service.name" .) .Values.proxy.service.ports.http.port) }} +{{- $hostNameOverride := coalesce .Values.web.config.HTTPProxyHostnameOverride .Values.proxy.hostname -}} +{{ $hostNameOverride | default (printf "%s:%v" (include "perforator.proxy.service.name" .) .Values.proxy.service.ports.http.port) }} {{- end }} {{- define "perforator.proxy.host.grpc" -}} -{{ .Values.proxy.hostname | default (printf "%s:%v" (include "perforator.proxy.service.name" .) .Values.proxy.service.ports.grpc.port) }} +{{- $hostNameOverride := coalesce .Values.web.config.GRPCProxyHostnameOverride .Values.proxy.hostname -}} +{{ $hostNameOverride | default (printf "%s:%v" (include "perforator.proxy.service.name" .) .Values.proxy.service.ports.grpc.port) }} {{- end }} {{- define "perforator.proxy.service.name" -}} diff --git a/perforator/deploy/kubernetes/helm/perforator/values.yaml b/perforator/deploy/kubernetes/helm/perforator/values.yaml index 21d9614a..8cd47a20 100644 --- a/perforator/deploy/kubernetes/helm/perforator/values.yaml +++ b/perforator/deploy/kubernetes/helm/perforator/values.yaml @@ -157,6 +157,8 @@ agent: useCustom: false # Custom config content. This is passed into tpl function which allows templating from values. custom: '' + # Overrides storage hostname, might be useful if storage is in a separate release. + storageHostnameOverride: "" # Label used to describe nodes topology. topologyLableKey: "topology.kubernetes.io/zone" @@ -389,6 +391,7 @@ storage: metrics: 85 # Overrides storage hostname inside kubernetes cluster. + # DEPRECATED: use agent.config.storageHostnameOverride instead. hostname: "" proxy: @@ -525,7 +528,9 @@ proxy: http: 80 grpc: 81 metrics: 85 + # Overrides proxy hostname inside kubernetes cluster. + # DEPRECATED: use web.config.HTTPProxyHostnameOverride and web.config.GRPCProxyHostnameOverride instead. hostname: "" web: @@ -536,6 +541,10 @@ web: useCustom: false #Custom config content. This is passed into tpl function which allows templating from values. custom: '' + # Overrides proxy http hostname, might be useful if proxy is in a separate release. + HTTPProxyHostnameOverride: "" + # Overrides proxy grpc hostname, might be useful if proxy is in a separate release. + GRPCProxyHostnameOverride: "" # Number of pods to deploy. replicas: 1