1 # Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 {{/* vim: set filetype=mustache: */}}
16 Expand the name of the chart.
20 {{ define "elasticsearch.clustername"}}
21 {{- printf "%s-%s" (include "common.name" .) "cluster" -}}
25 This define should be used instead of "common.fullname" to allow
26 special handling of kibanaEnabled=true
27 Create a default fully qualified coordinating name.
28 We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
30 {{- define "elasticsearch.coordinating.fullname" -}}
31 {{- if .Values.global.kibanaEnabled -}}
32 {{- printf "%s-%s" .Release.Name .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}}
34 {{- printf "%s-%s" (include "common.fullname" .) .Values.global.coordinating.name | trunc 63 | trimSuffix "-" -}}
39 Create the name of the master service account to use
41 {{- define "elasticsearch.master.serviceAccountName" -}}
42 {{- if .Values.master.serviceAccount.create -}}
43 {{ default (include "common.fullname" (dict "suffix" "master" "dot" .)) .Values.master.serviceAccount.name }}
45 {{ default "default" .Values.master.serviceAccount.name }}
50 Create the name of the coordinating-only service account to use
52 {{- define "elasticsearch.serviceAccountName" -}}
53 {{- if .Values.serviceAccount.create -}}
54 {{ default (include "common.fullname" . ) .Values.serviceAccount.name }}
56 {{ default "default" .Values.serviceAccount.name }}
61 Create the name of the data service account to use
63 {{- define "elasticsearch.data.serviceAccountName" -}}
64 {{- if .Values.serviceAccount.create -}}
65 {{ default (include "common.fullname" (dict "suffix" "data" "dot" .)) .Values.data.serviceAccount.name }}
67 {{ default "default" .Values.serviceAccount.name }}
73 Return the proper Docker Image Registry Secret Names
75 {{- define "elasticsearch.imagePullSecrets" -}}
76 {{- if .Values.global }}
77 {{- if .Values.global.imagePullSecrets }}
79 {{- range .Values.global.imagePullSecrets }}
84 {{- $imagePullSecrets := coalesce .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.curator.image.pullSecrets .Values.sysctlImage.pullSecrets .Values.volumePermissions.image.pullSecrets -}}
85 {{- if $imagePullSecrets }}
87 {{- range $imagePullSecrets }}
95 Create the name of the service account to use
97 {{- define "elasticsearch.curator.serviceAccountName" -}}
98 {{- if .Values.curator.serviceAccount.create -}}
99 {{ default (include "common.fullname" (dict "suffix" "currator" "dot" .)) .Values.curator.serviceAccount.name }}
101 {{ default "default" .Values.curator.serviceAccount.name }}