submgr chart using common port listing
[it/dep.git] / ric-common / Common-Template / helm / ric-common / templates / _servicename.tpl
1 ################################################################################
2 #   Copyright (c) 2019 AT&T Intellectual Property.                             #
3 #   Copyright (c) 2019 Nokia.                                                  #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17
18 {{/*
19   Resolve the name of a chart's service.
20
21   The default will be the chart name (or .Values.nameOverride if set).
22   And the use of .Values.service.name overrides all.
23
24   - .Values.service.name  : override default service (ie. chart) name
25 */}}
26 {{/*
27   Expand the service name for a chart.
28 */}}
29
30
31 ###################### RMR Service ##################################
32 {{- define "common.servicename.appmgr.rmr" -}}
33   {{- $name := ( include "common.fullname.appmgr" . ) -}}
34   {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
35 {{- end -}}
36
37
38 {{- define "common.servicename.e2mgr.rmr" -}}
39   {{- $name := ( include "common.fullname.e2mgr" . ) -}}
40   {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
41 {{- end -}}
42
43 {{- define "common.servicename.e2term.rmr" -}}
44   {{- $name := ( include "common.fullname.e2term" . ) -}}
45   {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
46 {{- end -}}
47
48 {{- define "common.servicename.rtmgr.rmr" -}}
49   {{- $name := ( include "common.fullname.rtmgr" . ) -}}
50   {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
51 {{- end -}}
52
53 {{- define "common.servicename.submgr.rmr" -}}
54   {{- $name := ( include "common.fullname.submgr" . ) -}}
55   {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
56 {{- end -}}
57
58 {{- define "common.servicename.a1mediator.rmr" -}}
59   {{- $name := ( include "common.fullname.a1mediator" . ) -}}
60   {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
61 {{- end -}}
62
63
64 ###################### Http Service ##################################
65
66 {{- define "common.servicename.appmgr.http" -}}
67   {{- $name := ( include "common.fullname.appmgr" . ) -}}
68   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
69 {{- end -}}
70
71 {{- define "common.servicename.e2mgr.http" -}}
72   {{- $name := ( include "common.fullname.e2mgr" . ) -}}
73   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
74 {{- end -}}
75
76 {{- define "common.servicename.e2term.http" -}}
77   {{- $name := ( include "common.fullname.e2term" . ) -}}
78   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
79 {{- end -}}
80
81 {{- define "common.servicename.rtmgr.http" -}}
82   {{- $name := ( include "common.fullname.rtmgr" . ) -}}
83   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
84 {{- end -}}
85
86 {{- define "common.servicename.submgr.http" -}}
87   {{- $name := ( include "common.fullname.submgr" . ) -}}
88   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
89 {{- end -}}
90
91 {{- define "common.servicename.a1mediator.http" -}}
92   {{- $name := ( include "common.fullname.a1mediator" . ) -}}
93   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
94 {{- end -}}
95
96 {{- define "common.servicename.nexus.http" -}}
97   {{- $name := ( include "common.fullname.nexus" . ) -}}
98   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
99 {{- end -}}
100
101 {{- define "common.servicename.dashboard.http" -}}
102   {{- $name := ( include "common.fullname.dashboard" . ) -}}
103   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
104 {{- end -}}
105
106
107 ###################### TCP Service ##################################
108
109 {{- define "common.servicename.dbaas.tcp" -}}
110   {{- $name := ( include "common.fullname.dbaas" . ) -}}
111   {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}}
112 {{- end -}}
113
114 {{- define "common.servicename.messagerouter.tcp" -}}
115   {{- $name := ( include "common.fullname.messagerouter" . ) -}}
116   {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}}
117 {{- end -}}
118
119 {{- define "common.servicename.ves.tcp" -}}
120   {{- $name := ( include "common.fullname.ves" . ) -}}
121   {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}}
122 {{- end -}}