Enhanced SIM for E2AP v1 for TS UC
[sim/e2-interface.git] / e2sim / e2apv1sim / helm / e2sim / templates / _helpers.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 {{/* vim: set filetype=mustache: */}}
19 {{/*
20 Expand the name of the chart.
21 */}}
22 {{- define "e2sim.name" -}}
23 {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
24 {{- end -}}
25
26 {{/*
27 Create a default fully qualified app name.
28 We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
29 If release name contains chart name it will be used as a full name.
30 */}}
31 {{- define "e2sim.fullname" -}}
32 {{- if .Values.fullnameOverride -}}
33 {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
34 {{- else -}}
35 {{- $name := default .Chart.Name .Values.nameOverride -}}
36 {{- if contains $name .Release.Name -}}
37 {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
38 {{- else -}}
39 {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
40 {{- end -}}
41 {{- end -}}
42 {{- end -}}
43
44 {{/*
45 Create chart name and version as used by the chart label.
46 */}}
47 {{- define "e2sim.chart" -}}
48 {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
49 {{- end -}}