diff options
author | Ritu Sood <ritu.sood@intel.com> | 2021-05-05 23:14:30 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-05-05 23:14:30 +0000 |
commit | 82f24ca5bb7c18fb9ed495261285f45a421c5634 (patch) | |
tree | f1c1a8e879a40f2385c68f4aba1813388fa1f36e /kud/deployment_infra/helm/sriov-network/templates/_helpers.tpl | |
parent | e6fbe6c0d75098e29143b4f8e4b21207c0ec51a3 (diff) | |
parent | 7fc924c09cf751c82fdd532ab0d3799395a1893b (diff) |
Merge "Add sriov-network addon helm chart"
Diffstat (limited to 'kud/deployment_infra/helm/sriov-network/templates/_helpers.tpl')
-rw-r--r-- | kud/deployment_infra/helm/sriov-network/templates/_helpers.tpl | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/kud/deployment_infra/helm/sriov-network/templates/_helpers.tpl b/kud/deployment_infra/helm/sriov-network/templates/_helpers.tpl new file mode 100644 index 00000000..08baf040 --- /dev/null +++ b/kud/deployment_infra/helm/sriov-network/templates/_helpers.tpl @@ -0,0 +1,34 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "sriov-network.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "sriov-network.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "sriov-network.labels" -}} +helm.sh/chart: {{ include "sriov-network.chart" . }} +{{ include "sriov-network.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "sriov-network.selectorLabels" -}} +app.kubernetes.io/name: {{ include "sriov-network.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} |