Update rtmgr chart
[it/dep.git] / ric-common / Common-Template / helm / ric-common / templates / _name.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   This is the root file that define the name of each component. Value here will be used to define other K8S resource name.
20 */}}
21
22
23
24 {{- define "common.name.appmgr" -}}
25   {{- if .Values.appmgr -}}
26     {{- if .Values.appmgr.nameOverride -}}
27       {{- printf "%s" .Values.appmgr.nameOverride -}}
28     {{- else -}}
29       {{- printf "appmgr" -}}
30     {{- end -}}
31   {{- else -}}
32     {{- printf "appmgr" -}}
33   {{- end -}}
34 {{- end -}}
35
36 {{- define "common.fullname.appmgr" -}}
37   {{- $name := ( include "common.name.appmgr" . ) -}}
38   {{- $namespace := ( include "common.namespace.platform" . ) -}}
39   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
40 {{- end -}}
41
42
43 {{- define "common.name.dbaas" -}}
44   {{- if .Values.dbaas -}}
45     {{- if .Values.dbaas.nameOverride -}}
46       {{- printf "%s" .Values.dbaas.nameOverride -}}
47     {{- else -}}
48       {{- printf "dbaas" -}}
49     {{- end -}}
50   {{- else -}}
51     {{- printf "dbaas" -}}
52   {{- end -}}
53 {{- end -}}
54
55 {{- define "common.fullname.dbaas" -}}
56   {{- $name := ( include "common.name.dbaas" . ) -}}
57   {{- $namespace := ( include "common.namespace.platform" . ) -}}
58   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
59 {{- end -}}
60
61
62
63
64
65
66
67
68
69
70
71 {{- define "common.name.e2mgr" -}}
72   {{- if .Values.e2mgr -}}
73     {{- if .Values.e2mgr.nameOverride -}}
74       {{- printf "%s" .Values.e2mgr.nameOverride -}}
75     {{- else -}}
76       {{- printf "e2mgr" -}}
77     {{- end -}}
78   {{- else -}}
79     {{- printf "e2mgr" -}}
80   {{- end -}}
81 {{- end -}}
82
83
84 {{- define "common.fullname.e2mgr" -}}
85   {{- $name := ( include "common.name.e2mgr" . ) -}}
86   {{- $namespace := ( include "common.namespace.platform" . ) -}}
87   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
88 {{- end -}}
89
90 {{- define "common.name.e2term" -}}
91   {{- if .Values.e2term -}}
92     {{- if .Values.e2term.nameOverride -}}
93       {{- printf "%s" .Values.e2term.nameOverride -}}
94     {{- else -}}
95       {{- printf "e2term" -}}
96     {{- end -}}
97   {{- else -}}
98     {{- printf "e2term" -}}
99   {{- end -}}
100 {{- end -}}
101
102
103 {{- define "common.fullname.e2term" -}}
104   {{- $name := ( include "common.name.e2term" . ) -}}
105   {{- $namespace := ( include "common.namespace.platform" . ) -}}
106   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
107 {{- end -}}
108
109
110
111
112
113
114
115
116
117 {{- define "common.name.rtmgr" -}}
118   {{- if .Values.rtmgr -}}
119     {{- if .Values.rtmgr.nameOverride -}}
120       {{- printf "%s" .Values.rtmgr.nameOverride -}}
121     {{- else -}}
122       {{- printf "rtmgr" -}}
123     {{- end -}}
124   {{- else -}}
125     {{- printf "rtmgr" -}}
126   {{- end -}}
127 {{- end -}}
128
129
130 {{- define "common.fullname.rtmgr" -}}
131   {{- $name := ( include "common.name.rtmgr" . ) -}}
132   {{- $namespace := ( include "common.namespace.platform" . ) -}}
133   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
134 {{- end -}}
135
136
137
138
139
140
141 {{- define "common.name.submgr" -}}
142   {{- if .Values.submgr -}}
143     {{- if .Values.submgr.nameOverride -}}
144       {{- printf "%s" .Values.submgr.nameOverride -}}
145     {{- else -}}
146       {{- printf "submgr" -}}
147     {{- end -}}
148   {{- else -}}
149     {{- printf "submgr" -}}
150   {{- end -}}
151 {{- end -}}
152
153
154 {{- define "common.fullname.submgr" -}}
155   {{- $name := ( include "common.name.submgr" . ) -}}
156   {{- $namespace := ( include "common.namespace.platform" . ) -}}
157   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
158 {{- end -}}
159
160
161
162
163
164
165 {{- define "common.name.a1mediator" -}}
166   {{- if .Values.a1mediator -}}
167     {{- if .Values.a1mediator.nameOverride -}}
168       {{- printf "%s" .Values.a1mediator.nameOverride -}}
169     {{- else -}}
170       {{- printf "a1mediator" -}}
171     {{- end -}}
172   {{- else -}}
173     {{- printf "a1mediator" -}}
174   {{- end -}}
175 {{- end -}}
176
177
178 {{- define "common.fullname.a1mediator" -}}
179   {{- $name := ( include "common.name.a1mediator" . ) -}}
180   {{- $namespace := ( include "common.namespace.platform" . ) -}}
181   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
182 {{- end -}}
183
184
185
186 {{- define "common.name.nexus" -}}
187   {{- if .Values.nexus -}}
188     {{- if .Values.nexus.nameOverride -}}
189       {{- printf "%s" .Values.nexus.nameOverride -}}
190     {{- else -}}
191       {{- printf "nexus" -}}
192     {{- end -}}
193   {{- else -}}
194     {{- printf "nexus" -}}
195   {{- end -}}
196 {{- end -}}
197
198
199 {{- define "common.fullname.nexus" -}}
200   {{- $name := ( include "common.name.nexus" . ) -}}
201   {{- $namespace := ( include "common.namespace.infra" . ) -}}
202   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
203 {{- end -}}
204
205
206 {{- define "common.name.dashboard" -}}
207   {{- if .Values.dashboard -}}
208     {{- if .Values.dashboard.nameOverride -}}
209       {{- printf "%s" .Values.dashboard.nameOverride -}}
210     {{- else -}}
211       {{- printf "dashboard" -}}
212     {{- end -}}
213   {{- else -}}
214     {{- printf "dashboard" -}}
215   {{- end -}}
216 {{- end -}}
217
218
219 {{- define "common.fullname.dashboard" -}}
220   {{- $name := ( include "common.name.dashboard" . ) -}}
221   {{- $namespace := ( include "common.namespace.aux" . ) -}}
222   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
223 {{- end -}}
224
225 {{- define "common.name.messagerouter" -}}
226   {{- if .Values.messagerouter -}}
227     {{- if .Values.messagerouter.nameOverride -}}
228       {{- printf "%s" .Values.messagerouter.nameOverride -}}
229     {{- else -}}
230       {{- printf "messagerouter" -}}
231     {{- end -}}
232   {{- else -}}
233     {{- printf "messagerouter" -}}
234   {{- end -}}
235 {{- end -}}
236
237
238 {{- define "common.fullname.messagerouter" -}}
239   {{- $name := ( include "common.name.messagerouter" . ) -}}
240   {{- $namespace := ( include "common.namespace.aux" . ) -}}
241   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
242 {{- end -}}
243
244
245 {{- define "common.name.ves" -}}
246   {{- if .Values.ves -}}
247     {{- if .Values.ves.nameOverride -}}
248       {{- printf "%s" .Values.ves.nameOverride -}}
249     {{- else -}}
250       {{- printf "ves" -}}
251     {{- end -}}
252   {{- else -}}
253     {{- printf "ves" -}}
254   {{- end -}}
255 {{- end -}}
256
257
258 {{- define "common.fullname.ves" -}}
259   {{- $name := ( include "common.name.ves" . ) -}}
260   {{- $namespace := ( include "common.namespace.aux" . ) -}}
261   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
262 {{- end -}}
263
264 {{- define "common.name" -}}
265   {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
266 {{- end -}}
267
268 {{/*
269   Create a default fully qualified application name.
270   Truncated at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
271 */}}
272 {{- define "common.fullname" -}}
273   {{- $name := default .Chart.Name .Values.nameOverride -}}
274   {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
275 {{- end -}}