Roni Riska | 927cde4 | 2019-08-27 11:46:51 +0300 | [diff] [blame] | 1 | # Copyright (c) 2019 AT&T Intellectual Property. |
| 2 | # Copyright (c) 2019 Nokia. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
czichy | 344af7a | 2019-11-26 11:08:33 +0200 | [diff] [blame^] | 16 | # |
| 17 | # This source code is part of the near-RT RIC (RAN Intelligent Controller) |
| 18 | # platform project (RICP). |
| 19 | # |
| 20 | |
Roni Riska | 927cde4 | 2019-08-27 11:46:51 +0300 | [diff] [blame] | 21 | {{/* vim: set filetype=mustache: */}} |
| 22 | {{/* |
| 23 | Expand the name of the chart. |
| 24 | */}} |
| 25 | {{- define "jaeger-all-in-one.name" -}} |
| 26 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} |
| 27 | {{- end -}} |
| 28 | |
| 29 | {{/* |
| 30 | Create a default fully qualified app name. |
| 31 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). |
| 32 | If release name contains chart name it will be used as a full name. |
| 33 | */}} |
| 34 | {{- define "jaeger-all-in-one.fullname" -}} |
| 35 | {{- if .Values.fullnameOverride -}} |
| 36 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} |
| 37 | {{- else -}} |
| 38 | {{- $name := default .Chart.Name .Values.nameOverride -}} |
| 39 | {{- if contains $name .Release.Name -}} |
| 40 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} |
| 41 | {{- else -}} |
| 42 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} |
| 43 | {{- end -}} |
| 44 | {{- end -}} |
| 45 | {{- end -}} |
| 46 | |
| 47 | {{/* |
| 48 | Create chart name and version as used by the chart label. |
| 49 | */}} |
| 50 | {{- define "jaeger-all-in-one.chart" -}} |
| 51 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} |
| 52 | {{- end -}} |
| 53 | |
| 54 | {{/* |
| 55 | Common labels |
| 56 | */}} |
| 57 | {{- define "jaeger-all-in-one.labels" -}} |
| 58 | app.kubernetes.io/name: {{ include "jaeger-all-in-one.name" . }} |
| 59 | helm.sh/chart: {{ include "jaeger-all-in-one.chart" . }} |
| 60 | app.kubernetes.io/instance: {{ .Release.Name }} |
| 61 | {{- if .Chart.AppVersion }} |
| 62 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} |
| 63 | {{- end }} |
| 64 | app.kubernetes.io/managed-by: {{ .Release.Service }} |
| 65 | {{- end -}} |