New version of the common template. It unifies the naming convention between platform...
[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.a1mediator.rmr" -}}
54   {{- $name := ( include "common.fullname.a1mediator" . ) -}}
55   {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
56 {{- end -}}
57
58
59 ###################### Http Service ##################################
60
61 {{- define "common.servicename.appmgr.http" -}}
62   {{- $name := ( include "common.fullname.appmgr" . ) -}}
63   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
64 {{- end -}}
65
66 {{- define "common.servicename.e2mgr.http" -}}
67   {{- $name := ( include "common.fullname.e2mgr" . ) -}}
68   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
69 {{- end -}}
70
71 {{- define "common.servicename.e2term.http" -}}
72   {{- $name := ( include "common.fullname.e2term" . ) -}}
73   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
74 {{- end -}}
75
76 {{- define "common.servicename.rtmgr.http" -}}
77   {{- $name := ( include "common.fullname.rtmgr" . ) -}}
78   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
79 {{- end -}}
80
81 {{- define "common.servicename.a1mediator.http" -}}
82   {{- $name := ( include "common.fullname.a1mediator" . ) -}}
83   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
84 {{- end -}}
85
86
87 {{- define "common.servicename.nexus.http" -}}
88   {{- $name := ( include "common.fullname.nexus" . ) -}}
89   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
90 {{- end -}}
91 ###################### TCP Service ##################################
92
93 {{- define "common.servicename.dbaas.tcp" -}}
94   {{- $name := ( include "common.fullname.dbaas" . ) -}}
95   {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}}
96 {{- end -}}