github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/coherence-operator/templates/_helpers.tpl (about) 1 {{/* Copyright 2020, Oracle Corporation and/or its affiliates */}} 2 {{/* Licensed under the Universal Permissive License v 1.0 as shown at */}} 3 {{/* http://oss.oracle.com/licenses/upl. */}} 4 5 {{/* vim: set filetype=mustache: */}} 6 {{/* 7 Expand the name of the chart. 8 */}} 9 {{- define "coherence-operator.name" -}} 10 {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 11 {{- end -}} 12 13 {{/* 14 Create a default fully qualified app name. 15 We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 16 If release name contains chart name it will be used as a full name. 17 */}} 18 {{- define "coherence-operator.fullname" -}} 19 {{- if .Values.fullnameOverride -}} 20 {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 21 {{- else -}} 22 {{- $name := default .Chart.Name .Values.nameOverride -}} 23 {{- if contains $name .Release.Name -}} 24 {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 25 {{- else -}} 26 {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 27 {{- end -}} 28 {{- end -}} 29 {{- end -}} 30 31 {{/* 32 Create chart name and version as used by the chart label. 33 */}} 34 {{- define "coherence-operator.chart" -}} 35 {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 36 {{- end -}} 37 38 {{/* 39 Create the release labels. 40 These are a common set of labels applied to all of the resources 41 generated from this chart. 42 */}} 43 {{- define "coherence-operator.release_labels" }} 44 heritage: {{ .Release.Service | quote }} 45 release: {{ .Release.Name | quote }} 46 chart: {{ template "coherence-operator.chart" . }} 47 app: {{ template "coherence-operator.name" . }} 48 component: coherence-operator 49 {{- end }}