diff options
author | 2019-06-03 15:03:41 -0700 | |
---|---|---|
committer | 2019-06-03 15:05:34 -0700 | |
commit | d3aaa31be6005e9fe7446c7fd9a1492aad8a6fd0 (patch) | |
tree | 25929e1f6564b0e3501233a50f14dfdcd4823dd8 /vnfs/DAaaS/sample-apps/sample-minio-load-model/templates/_helpers.tpl | |
parent | e8abc0fdf80f9c75b8f789cd5eb5dd3e5c4510a8 (diff) |
Sample application to load model from Minio
Sample application with helm charts to load from model repo.
Change-Id: If8d09e64044bc2587c444efd3ac95a451ec361dd
Issue-ID: ONAPARC-460
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
Diffstat (limited to 'vnfs/DAaaS/sample-apps/sample-minio-load-model/templates/_helpers.tpl')
-rwxr-xr-x | vnfs/DAaaS/sample-apps/sample-minio-load-model/templates/_helpers.tpl | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/vnfs/DAaaS/sample-apps/sample-minio-load-model/templates/_helpers.tpl b/vnfs/DAaaS/sample-apps/sample-minio-load-model/templates/_helpers.tpl new file mode 100755 index 00000000..5aa78da6 --- /dev/null +++ b/vnfs/DAaaS/sample-apps/sample-minio-load-model/templates/_helpers.tpl @@ -0,0 +1,43 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "model-loader.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "model-loader.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "model-loader.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create the name of the service account +*/}} +{{- define "model-loader.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "model-loader.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} |