COMAC-188 Use service domain for HSS and MME diameter peer
Change-Id: Ie1794a4ec65ce0f42303df7c226a0ff6a2e00ec8
diff --git a/omec/omec-control-plane/templates/_helpers.tpl b/omec/omec-control-plane/templates/_helpers.tpl
index a6630f1..223a933 100644
--- a/omec/omec-control-plane/templates/_helpers.tpl
+++ b/omec/omec-control-plane/templates/_helpers.tpl
@@ -37,18 +37,18 @@
{{- end -}}
{{/*
-Return identity, realm, and hostname of the first pod of the given statefulset.
+Return s6a service for Diameter identity, realm, and hostname for a given application.
*/}}
-{{- define "omec-control-plane.endpoint_lookup" -}}
+{{- define "omec-control-plane.diameter_endpoint" -}}
{{- $service := index . 0 -}}
{{- $type := index . 1 -}}
{{- $context := index . 2 -}}
{{- if eq $type "identity" -}}
-{{- printf "%s-0.%s.%s.svc.%s" $service $service $context.Release.Namespace "cluster.local" -}}
+{{- printf "%s-s6a.%s.svc.%s" $service $context.Release.Namespace "cluster.local" -}}
{{- else if eq $type "realm" -}}
-{{- printf "%s.%s.svc.%s" $service $context.Release.Namespace "cluster.local" -}}
+{{- printf "%s.svc.%s" $context.Release.Namespace "cluster.local" -}}
{{- else if eq $type "host" -}}
-{{- printf "%s-0" $service -}}
+{{- printf "%s-s6a" $service -}}
{{- end -}}
{{- end -}}