Skip to content

Commit

Permalink
[perforator][helm] rename host override field to make it clearer
Browse files Browse the repository at this point in the history
commit_hash:a5503422c0fbf677575951ae4909f4ef16b0502d
  • Loading branch information
tangyatsu committed Feb 14, 2025
1 parent bd22dcc commit 28ce16e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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" -}}
Expand All @@ -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" -}}
Expand Down
9 changes: 9 additions & 0 deletions perforator/deploy/kubernetes/helm/perforator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -389,6 +391,7 @@ storage:
metrics: 85

# Overrides storage hostname inside kubernetes cluster.
# DEPRECATED: use agent.config.storageHostnameOverride instead.
hostname: ""

proxy:
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 28ce16e

Please sign in to comment.