aboutsummaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/helm/sriov-network/templates/_helpers.tpl
diff options
context:
space:
mode:
authorTodd Malsbary <todd.malsbary@intel.com>2021-03-19 15:07:32 -0700
committerTodd Malsbary <todd.malsbary@intel.com>2021-05-04 13:14:30 -0700
commit7fc924c09cf751c82fdd532ab0d3799395a1893b (patch)
tree4736eea20b4ed7360c4eb4acec7a5d7d8cff57d0 /kud/deployment_infra/helm/sriov-network/templates/_helpers.tpl
parentc7cc63c3e76d5739c67314008b01f6fe70289641 (diff)
Add sriov-network addon helm chart
This chart deploys the CR used by the sriov-network-operator. Issue-ID: MULTICLOUD-1324 Signed-off-by: Todd Malsbary <todd.malsbary@intel.com> Change-Id: I9364868d3e58fd64e51a77aaa934284fad86a1b1
Diffstat (limited to 'kud/deployment_infra/helm/sriov-network/templates/_helpers.tpl')
-rw-r--r--kud/deployment_infra/helm/sriov-network/templates/_helpers.tpl34
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 -}}