Fixes for ric-aux
[it/dep.git] / ric-platform / 50-RIC-Platform / helm / 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   {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
39 {{- end -}}
40
41
42 {{- define "common.name.dbaas" -}}
43   {{- if .Values.dbaas -}}
44     {{- if .Values.dbaas.nameOverride -}}
45       {{- printf "%s" .Values.dbaas.nameOverride -}}
46     {{- else -}}
47       {{- printf "dbaas" -}}
48     {{- end -}}
49   {{- else -}}
50     {{- printf "dbaas" -}}
51   {{- end -}}
52 {{- end -}}
53
54 {{- define "common.fullname.dbaas" -}}
55   {{- $name := ( include "common.name.dbaas" . ) -}}
56   {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
57 {{- end -}}
58
59
60
61
62
63
64
65
66
67
68
69 {{- define "common.name.e2mgr" -}}
70   {{- if .Values.e2mgr -}}
71     {{- if .Values.e2mgr.nameOverride -}}
72       {{- printf "%s" .Values.e2mgr.nameOverride -}}
73     {{- else -}}
74       {{- printf "e2mgr" -}}
75     {{- end -}}
76   {{- else -}}
77     {{- printf "e2mgr" -}}
78   {{- end -}}
79 {{- end -}}
80
81
82 {{- define "common.fullname.e2mgr" -}}
83   {{- $name := ( include "common.name.e2mgr" . ) -}}
84   {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
85 {{- end -}}
86
87 {{- define "common.name.e2term" -}}
88   {{- if .Values.e2term -}}
89     {{- if .Values.e2term.nameOverride -}}
90       {{- printf "%s" .Values.e2term.nameOverride -}}
91     {{- else -}}
92       {{- printf "e2term" -}}
93     {{- end -}}
94   {{- else -}}
95     {{- printf "e2term" -}}
96   {{- end -}}
97 {{- end -}}
98
99
100 {{- define "common.fullname.e2term" -}}
101   {{- $name := ( include "common.name.e2term" . ) -}}
102   {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
103 {{- end -}}
104
105
106
107
108
109
110
111
112
113 {{- define "common.name.rtmgr" -}}
114   {{- if .Values.rtmgr -}}
115     {{- if .Values.rtmgr.nameOverride -}}
116       {{- printf "%s" .Values.rtmgr.nameOverride -}}
117     {{- else -}}
118       {{- printf "rtmgr" -}}
119     {{- end -}}
120   {{- else -}}
121     {{- printf "rtmgr" -}}
122   {{- end -}}
123 {{- end -}}
124
125
126 {{- define "common.fullname.rtmgr" -}}
127   {{- $name := ( include "common.name.rtmgr" . ) -}}
128   {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
129 {{- end -}}
130
131
132
133
134
135
136 {{- define "common.name.a1mediator" -}}
137   {{- if .Values.a1mediator -}}
138     {{- if .Values.a1mediator.nameOverride -}}
139       {{- printf "%s" .Values.a1mediator.nameOverride -}}
140     {{- else -}}
141       {{- printf "a1mediator" -}}
142     {{- end -}}
143   {{- else -}}
144     {{- printf "a1mediator" -}}
145   {{- end -}}
146 {{- end -}}
147
148
149 {{- define "common.fullname.a1mediator" -}}
150   {{- $name := ( include "common.name.a1mediator" . ) -}}
151   {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
152 {{- end -}}
153
154
155
156
157
158
159
160
161 {{- define "common.name" -}}
162   {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
163 {{- end -}}
164
165 {{/*
166   Create a default fully qualified application name.
167   Truncated at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
168 */}}
169 {{- define "common.fullname" -}}
170   {{- $name := default .Chart.Name .Values.nameOverride -}}
171   {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
172 {{- end -}}