summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/common-templates/templates/_namespace.tpl
blob: 076fd53f7ae490ae38774ca19247efc620f33802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{{/*
  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:

  - .Values.nsPrefix  : override namespace prefix
  - .Values.nsSuffix  : override namespace suffix
*/}}
{{- define "common.namespace" -}}
  {{- $prefix := default .Release.Name .Values.nsPrefix -}}
  {{- $suffix := default .Chart.Name .Values.nsSuffix -}}
  {{- printf "%s-%s" $prefix $suffix -}}
{{- end -}}