d2f17e96cfb5ac2c560601591a9f34ecf483caaf
[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
91 {{- define "common.name.rsm" -}}
92   {{- if .Values.rsm -}}
93     {{- if .Values.rsm.nameOverride -}}
94       {{- printf "%s" .Values.rsm.nameOverride -}}
95     {{- else -}}
96       {{- printf "rsm" -}}
97     {{- end -}}
98   {{- else -}}
99     {{- printf "rsm" -}}
100   {{- end -}}
101 {{- end -}}
102
103
104 {{- define "common.fullname.rsm" -}}
105   {{- $name := ( include "common.name.rsm" . ) -}}
106   {{- $namespace := ( include "common.namespace.platform" . ) -}}
107   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
108 {{- end -}}
109
110
111
112
113
114
115
116 {{- define "common.name.rtmgr" -}}
117   {{- if .Values.rtmgr -}}
118     {{- if .Values.rtmgr.nameOverride -}}
119       {{- printf "%s" .Values.rtmgr.nameOverride -}}
120     {{- else -}}
121       {{- printf "rtmgr" -}}
122     {{- end -}}
123   {{- else -}}
124     {{- printf "rtmgr" -}}
125   {{- end -}}
126 {{- end -}}
127
128
129 {{- define "common.fullname.rtmgr" -}}
130   {{- $name := ( include "common.name.rtmgr" . ) -}}
131   {{- $namespace := ( include "common.namespace.platform" . ) -}}
132   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
133 {{- end -}}
134
135
136
137
138
139
140 {{- define "common.name.submgr" -}}
141   {{- if .Values.submgr -}}
142     {{- if .Values.submgr.nameOverride -}}
143       {{- printf "%s" .Values.submgr.nameOverride -}}
144     {{- else -}}
145       {{- printf "submgr" -}}
146     {{- end -}}
147   {{- else -}}
148     {{- printf "submgr" -}}
149   {{- end -}}
150 {{- end -}}
151
152
153 {{- define "common.fullname.submgr" -}}
154   {{- $name := ( include "common.name.submgr" . ) -}}
155   {{- $namespace := ( include "common.namespace.platform" . ) -}}
156   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
157 {{- end -}}
158
159
160
161
162
163
164 {{- define "common.name.a1mediator" -}}
165   {{- if .Values.a1mediator -}}
166     {{- if .Values.a1mediator.nameOverride -}}
167       {{- printf "%s" .Values.a1mediator.nameOverride -}}
168     {{- else -}}
169       {{- printf "a1mediator" -}}
170     {{- end -}}
171   {{- else -}}
172     {{- printf "a1mediator" -}}
173   {{- end -}}
174 {{- end -}}
175
176
177 {{- define "common.fullname.a1mediator" -}}
178   {{- $name := ( include "common.name.a1mediator" . ) -}}
179   {{- $namespace := ( include "common.namespace.platform" . ) -}}
180   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
181 {{- end -}}
182
183
184 {{- define "common.name.vespamgr" -}}
185   {{- if .Values.vespamgr -}}
186     {{- if .Values.vespamgr.nameOverride -}}
187       {{- printf "%s" .Values.vespamgr.nameOverride -}}
188     {{- else -}}
189       {{- printf "vespamgr" -}}
190     {{- end -}}
191   {{- else -}}
192     {{- printf "vespamgr" -}}
193   {{- end -}}
194 {{- end -}}
195
196
197 {{- define "common.fullname.vespamgr" -}}
198   {{- $name := ( include "common.name.vespamgr" . ) -}}
199   {{- $namespace := ( include "common.namespace.platform" . ) -}}
200   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
201 {{- end -}}
202
203
204 {{- define "common.name.jaegeradapter" -}}
205   {{- if .Values.jaegeradapter -}}
206     {{- if .Values.jaegeradapter.nameOverride -}}
207       {{- printf "%s" .Values.jaegeradapter.nameOverride -}}
208     {{- else -}}
209       {{- printf "jaegeradapter" -}}
210     {{- end -}}
211   {{- else -}}
212     {{- printf "jaegeradapter" -}}
213   {{- end -}}
214 {{- end -}}
215  
216
217 {{- define "common.fullname.jaegeradapter" -}}
218   {{- $name := ( include "common.name.jaegeradapter" . ) -}}
219   {{- $namespace := ( include "common.namespace.platform" . ) -}}
220   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
221 {{- end -}}
222
223
224
225 {{- define "common.name.nexus" -}}
226   {{- if .Values.nexus -}}
227     {{- if .Values.nexus.nameOverride -}}
228       {{- printf "%s" .Values.nexus.nameOverride -}}
229     {{- else -}}
230       {{- printf "nexus" -}}
231     {{- end -}}
232   {{- else -}}
233     {{- printf "nexus" -}}
234   {{- end -}}
235 {{- end -}}
236
237
238 {{- define "common.fullname.nexus" -}}
239   {{- $name := ( include "common.name.nexus" . ) -}}
240   {{- $namespace := ( include "common.namespace.infra" . ) -}}
241   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
242 {{- end -}}
243
244 {{- define "common.name.chartmuseum" -}}
245   {{- if .Values.chartmuseum -}}
246     {{- if .Values.chartmuseum.nameOverride -}}
247       {{- printf "%s" .Values.chartmuseum.nameOverride -}}
248     {{- else -}}
249       {{- printf "chartmuseum" -}}
250     {{- end -}}
251   {{- else -}}
252     {{- printf "chartmuseum" -}}
253   {{- end -}}
254 {{- end -}}
255
256
257 {{- define "common.fullname.chartmuseum" -}}
258   {{- $name := ( include "common.name.chartmuseum" . ) -}}
259   {{- $namespace := ( include "common.namespace.infra" . ) -}}
260   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
261 {{- end -}}
262
263 {{- define "common.name.dashboard" -}}
264   {{- if .Values.dashboard -}}
265     {{- if .Values.dashboard.nameOverride -}}
266       {{- printf "%s" .Values.dashboard.nameOverride -}}
267     {{- else -}}
268       {{- printf "dashboard" -}}
269     {{- end -}}
270   {{- else -}}
271     {{- printf "dashboard" -}}
272   {{- end -}}
273 {{- end -}}
274
275
276 {{- define "common.fullname.dashboard" -}}
277   {{- $name := ( include "common.name.dashboard" . ) -}}
278   {{- $namespace := ( include "common.namespace.aux" . ) -}}
279   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
280 {{- end -}}
281
282 {{- define "common.name.messagerouter" -}}
283   {{- if .Values.messagerouter -}}
284     {{- if .Values.messagerouter.nameOverride -}}
285       {{- printf "%s" .Values.messagerouter.nameOverride -}}
286     {{- else -}}
287       {{- printf "messagerouter" -}}
288     {{- end -}}
289   {{- else -}}
290     {{- printf "messagerouter" -}}
291   {{- end -}}
292 {{- end -}}
293
294
295 {{- define "common.fullname.messagerouter" -}}
296   {{- $name := ( include "common.name.messagerouter" . ) -}}
297   {{- $namespace := ( include "common.namespace.aux" . ) -}}
298   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
299 {{- end -}}
300
301
302 {{- define "common.name.ves" -}}
303   {{- if .Values.ves -}}
304     {{- if .Values.ves.nameOverride -}}
305       {{- printf "%s" .Values.ves.nameOverride -}}
306     {{- else -}}
307       {{- printf "ves" -}}
308     {{- end -}}
309   {{- else -}}
310     {{- printf "ves" -}}
311   {{- end -}}
312 {{- end -}}
313
314
315 {{- define "common.fullname.ves" -}}
316   {{- $name := ( include "common.name.ves" . ) -}}
317   {{- $namespace := ( include "common.namespace.aux" . ) -}}
318   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
319 {{- end -}}
320
321 {{- define "common.name" -}}
322   {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
323 {{- end -}}
324
325 {{/*
326   Create a default fully qualified application name.
327   Truncated at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
328 */}}
329 {{- define "common.fullname" -}}
330   {{- $name := default .Chart.Name .Values.nameOverride -}}
331   {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
332 {{- end -}}