blob: 706bdf7e1bbd94721d4812298285b91c938ed68e [file] [log] [blame]
Woojoong Kim676bbac2021-01-15 12:00:33 -08001{{- /*
2
3# Copyright 2020-present Open Networking Foundation
4#
5# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
6
7*/ -}}
8
9{{/*
10Renders a set of standardised labels.
11*/}}
12{{- define "ros-core.metadata_labels" -}}
13{{- $application := index . 0 -}}
14{{- $context := index . 1 -}}
15release: {{ $context.Release.Name }}
16app: {{ $application }}
17{{- end -}}
18
19{{/*
20Render the given template.
21*/}}
22{{- define "ros-core.template" -}}
23{{- $name := index . 0 -}}
24{{- $context := index . 1 -}}
25{{- $last := base $context.Template.Name }}
26{{- $wtf := $context.Template.Name | replace $last $name -}}
27{{ include $wtf $context }}
28{{- end -}}