1 ################################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property. #
3 # Copyright (c) 2019 Nokia. #
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 #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
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 ################################################################################
19 Resolve the namespace to apply to a chart. The default namespace suffix
20 is the name of the chart. This can be overridden if necessary (eg. for subcharts)
21 using the following value:
23 - .Values.nsPrefix : override namespace prefix
26 {{- define "common.namespace.platform" -}}
27 {{- if .Values.global -}}
28 {{- if .Values.global.namespace -}}
29 {{- if .Values.global.namespace.platform -}}
30 {{- printf "%s" .Values.global.namespace.platform -}}
32 {{- printf "ricplt" -}}
35 {{- printf "ricplt" -}}
38 {{- printf "ricplt" -}}
42 {{- define "common.namespace.aux" -}}
43 {{- if .Values.global -}}
44 {{- if .Values.global.namespace -}}
45 {{- if .Values.global.namespace.aux -}}
46 {{- printf "%s" .Values.global.namespace.aux -}}
48 {{- printf "ricaux" -}}
51 {{- printf "ricaux" -}}
54 {{- printf "ricaux" -}}
58 {{- define "common.namespace.xapp" -}}
59 {{- if .Values.global -}}
60 {{- if .Values.global.namespace -}}
61 {{- if .Values.global.namespace.xapp -}}
62 {{- printf "%s" .Values.global.namespace.xapp -}}
64 {{- printf "ricxapp" -}}
67 {{- printf "ricxapp" -}}
70 {{- printf "ricxapp" -}}
74 {{- define "common.namespace.infra" -}}
75 {{- if .Values.global -}}
76 {{- if .Values.global.namespace -}}
77 {{- if .Values.global.namespace.infra -}}
78 {{- printf "%s" .Values.global.namespace.infra -}}
80 {{- printf "ricinfra" -}}
83 {{- printf "ricinfra" -}}
86 {{- printf "ricinfra" -}}
90 {{- define "common.namespace" -}}
91 {{- default .Release.Namespace .Values.nsPrefix -}}