Skip to content

Commit 4752e3f

Browse files
author
Istemi Ekin Akkus
authored
patch riak k8s riak config to pass all riak replicas to the DLService (#74)
* patch riak k8s riak config to pass all riak replicas to the DLService (instead of just the service name) * add service name to the riak replica pod addresses passed to DLService
1 parent b91e437 commit 4752e3f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

deploy/helm/microfunctions/templates/_helpers.tpl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@
2323
{{- end -}}
2424

2525
{{- define "rkConnect.url" }}
26-
{{- $rlsname := .Release.Name -}}
27-
{{- $namespace := .Release.Namespace -}}
2826
{{- $port := index .Values "riak" "ClientPortProtobuf" | toString -}}
29-
rk-{{$rlsname}}.{{$namespace}}.svc:{{$port}}
27+
{{- range $num, $e := until (.Values.riak.replicas|int) -}}
28+
{{- printf "rk-%s-%d.rk-%s.%s.svc:%d" $.Release.Name $num $.Release.Name $.Release.Namespace ($.Values.riak.ClientPortProtobuf|int) -}}
29+
{{- if lt $num ( sub ($.Values.riak.replicas|int) 1 ) -}}
30+
{{- printf "," -}}
31+
{{- end -}}
32+
{{- end -}}
3033
{{- end -}}
3134

3235
{{- define "dlConnect" }}
@@ -75,4 +78,4 @@
7578
{{- $namespace := .Release.Namespace -}}
7679
{{- $port := index .Values "elastic" "clientPort" | toString -}}
7780
es-{{$rlsname}}.{{$namespace}}.svc:{{$port}}
78-
{{- end -}}
81+
{{- end -}}

0 commit comments

Comments
 (0)