-{{/*
- Resolve the namespace to apply to a chart. The default namespace suffix
- is the name of the chart. This can be overridden if necessary (eg. for subcharts)
- using the following value:
+{{- define "common.namespace.platform" -}}
+ {{- $keylist := list "common" "namespace" "platform" -}}
+ {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+ {{- $namespace := include "locate" $ctx -}}
+ {{- if not (empty $namespace) -}}
+ {{- $namespace -}}
+ {{- else -}}
+ {{- printf "ricplt" -}}
+ {{- end -}}
+{{- end -}}
+
+{{- define "common.namespace.infra" -}}
+ {{- $keylist := list "common" "namespace" "infra" -}}
+ {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+ {{- $namespace := include "locate" $ctx -}}
+ {{- if not (empty $namespace) -}}
+ {{- $namespace -}}
+ {{- else -}}
+ {{- printf "ricinfra" -}}
+ {{- end -}}
+{{- end -}}
+
+{{- define "common.namespace.xapp" -}}
+ {{- $keylist := list "common" "namespace" "xapp" -}}
+ {{- $ctx := dict "ctx" $.Values "keylist" $keylist -}}
+ {{- $namespace := include "locate" $ctx -}}
+ {{- if not (empty $namespace) -}}
+ {{- $namespace -}}
+ {{- else -}}
+ {{- printf "ricxapp" -}}
+ {{- end -}}
+{{- end -}}
+