6ed3195387b58683b946973b67f1cd2c4247addb
[it/dep.git] / ric-common / Common-Template / helm / ric-common / templates / _e2term.tpl
1 ################################################################################
2 #   Copyright (c) 2019 AT&T Intellectual Property.                             #
3 #                                                                              #
4 #   Licensed under the Apache License, Version 2.0 (the "License");            #
5 #   you may not use this file except in compliance with the License.           #
6 #   You may obtain a copy of the License at                                    #
7 #                                                                              #
8 #       http://www.apache.org/licenses/LICENSE-2.0                             #
9 #                                                                              #
10 #   Unless required by applicable law or agreed to in writing, software        #
11 #   distributed under the License is distributed on an "AS IS" BASIS,          #
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
13 #   See the License for the specific language governing permissions and        #
14 #   limitations under the License.                                             #
15 ################################################################################
16
17 # template for component name
18 {{- define "common.name.e2term" -}}
19   {{- if .Values.e2term -}}
20     {{- if .Values.e2term.nameOverride -}}
21       {{- printf "%s" .Values.e2term.nameOverride -}}
22     {{- else -}}
23       {{- printf "e2term" -}}
24     {{- end -}}
25   {{- else -}}
26     {{- printf "e2term" -}}
27   {{- end -}}
28 {{- end -}}
29
30 {{- define "common.fullname.e2term" -}}
31   {{- $name := ( include "common.name.e2term" . ) -}}
32   {{- $namespace := ( include "common.namespace.platform" . ) -}}
33   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
34 {{- end -}}
35
36
37 {{- define "common.deploymentname.e2term" -}}
38   {{- $name := ( include "common.fullname.e2term" . ) -}}
39   {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
40 {{- end -}}
41
42 {{- define "common.configmapname.e2term" -}}
43   {{- $name := ( include "common.fullname.e2term" . ) -}}
44   {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
45 {{- end -}}
46
47 {{- define "common.containername.e2term" -}}
48   {{- $name := ( include "common.fullname.e2term" . ) -}}
49   {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
50 {{- end -}}
51
52 {{- define "common.pvname.e2term" -}}
53   {{- $name := ( include "common.fullname.e2term" . ) -}}
54   {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}}
55 {{- end -}}
56
57 {{- define "common.pvcname.e2term" -}}
58   {{- $name := ( include "common.fullname.e2term" . ) -}}
59   {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}}
60 {{- end -}}
61
62 {{- define "common.servicename.e2term.rmr" -}}
63   {{- $name := ( include "common.fullname.e2term" . ) -}}
64   {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
65 {{- end -}}
66
67 {{- define "common.servicename.e2term.http" -}}
68   {{- $name := ( include "common.fullname.e2term" . ) -}}
69   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
70 {{- end -}}
71
72
73
74 {{- define "common.serviceport.e2term.rmr.data" -}}38000{{- end -}}
75 {{- define "common.serviceport.e2term.rmr.route" -}}4561{{- end -}}
76 {{- define "common.serviceport.e2term.http" -}}8080{{- end -}}
77 {{- define "common.serviceport.e2term.sctp" -}}5577{{- end -}}
78
79
80 {{- define "common.serviceaccountname.e2term" -}}
81   {{- $name := ( include "common.fullname.e2term" . ) -}}
82   {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}
83 {{- end -}}