diff options
author | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2019-08-10 17:30:33 -0700 |
---|---|---|
committer | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2019-08-12 10:51:22 -0700 |
commit | 5404b24913f114fe6328d1ec20c7bb79d91a7a92 (patch) | |
tree | 7e252d5896d204a7722f84d24b1f8e4045b614ca /vnfs/DAaaS/deploy/operator/charts/collectd-operator/templates/_helpers.tpl | |
parent | 6bae7d6e0110dcb57cd48e813d1dbaf4fe1c9293 (diff) |
Helm charts for Collectd Operator
Helm charts for Collectd Operator
Issue-ID: ONAPARC-461
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
Change-Id: Icd1fc169f9e005030a0d2b48cf9dd76434bf6ba3
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
Diffstat (limited to 'vnfs/DAaaS/deploy/operator/charts/collectd-operator/templates/_helpers.tpl')
-rw-r--r-- | vnfs/DAaaS/deploy/operator/charts/collectd-operator/templates/_helpers.tpl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/vnfs/DAaaS/deploy/operator/charts/collectd-operator/templates/_helpers.tpl b/vnfs/DAaaS/deploy/operator/charts/collectd-operator/templates/_helpers.tpl new file mode 100644 index 00000000..88991c87 --- /dev/null +++ b/vnfs/DAaaS/deploy/operator/charts/collectd-operator/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "collectd-operator.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 "collectd-operator.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 "collectd-operator.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} |