diff options
author | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2019-08-19 23:18:20 -0700 |
---|---|---|
committer | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2019-08-19 23:18:20 -0700 |
commit | de82cc4d161f0010135ddcb4581f4864ea4c85e1 (patch) | |
tree | 7329355448fbdfaaa61dc3460570020753e12f06 /vnfs/DAaaS/sample-apps/sample-minio-save-model/templates/_helpers.tpl | |
parent | fb02e312f8b4136a1b0a3319e13ed911453b4374 (diff) |
Sample Application to save model to Minio
Sample Application to save model to Minio
Change-Id: Ieb5fe409564bfe363c4fd3fbab165d9c89ad5c37
Issue-ID: ONAPARC-460
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
Diffstat (limited to 'vnfs/DAaaS/sample-apps/sample-minio-save-model/templates/_helpers.tpl')
-rwxr-xr-x | vnfs/DAaaS/sample-apps/sample-minio-save-model/templates/_helpers.tpl | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/vnfs/DAaaS/sample-apps/sample-minio-save-model/templates/_helpers.tpl b/vnfs/DAaaS/sample-apps/sample-minio-save-model/templates/_helpers.tpl new file mode 100755 index 00000000..260d85cc --- /dev/null +++ b/vnfs/DAaaS/sample-apps/sample-minio-save-model/templates/_helpers.tpl @@ -0,0 +1,43 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "model-saver.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-saver.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-saver.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create the name of the service account +*/}} +{{- define "model-saver.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "model-saver.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} |