1 ################################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property. #
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 #
8 # http://www.apache.org/licenses/LICENSE-2.0 #
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 ################################################################################
20 name: {{ template "fullname" . }}
22 app: {{ .Chart.Name }}
23 release: {{ .Release.Name | quote }}
24 {{- range $key, $value := .Values.labels }}
25 {{ $key }}: {{ $value | quote }}
28 replicas: {{ .Values.replicas }}
30 {{ toYaml .Values.updateStrategy | indent 4 }}
34 release: {{ .Release.Name | quote }}
39 release: {{ .Release.Name | quote }}
41 {{- range $key, $value := .Values.podAnnotations }}
42 {{ $key }}: {{ $value | quote }}
44 {{/* This forces a restart if the configmap has changed */}}
45 {{- if .Values.kibanaConfig }}
46 configchecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }}
49 {{- if .Values.priorityClassName }}
50 priorityClassName: {{ .Values.priorityClassName }}
53 {{ toYaml .Values.podSecurityContext | indent 8 }}
54 {{- if .Values.serviceAccount }}
55 serviceAccount: {{ .Values.serviceAccount }}
58 {{- range .Values.secretMounts }}
61 secretName: {{ .secretName }}
63 {{- if .Values.kibanaConfig }}
66 name: {{ template "fullname" . }}-config
68 {{- with .Values.nodeSelector }}
70 {{ toYaml . | indent 8 }}
72 {{- with .Values.affinity }}
74 {{ toYaml . | indent 8 }}
76 {{- with .Values.tolerations }}
78 {{ toYaml . | indent 8 }}
80 {{- if .Values.imagePullSecrets }}
82 {{ toYaml .Values.imagePullSecrets | indent 8 }}
87 {{ toYaml .Values.securityContext | indent 10 }}
88 image: "{{ .Values.image }}:{{ .Values.imageTag }}"
89 imagePullPolicy: "{{ .Values.imagePullPolicy }}"
91 {{- if .Values.elasticsearchURL }}
92 - name: ELASTICSEARCH_URL
93 value: "{{ .Values.elasticsearchURL }}"
94 {{- else if .Values.elasticsearchHosts }}
95 - name: ELASTICSEARCH_HOSTS
96 value: "{{ .Values.elasticsearchHosts }}"
99 value: "{{ .Values.serverHost }}"
100 {{- if .Values.extraEnvs }}
101 {{ toYaml .Values.extraEnvs | indent 10 }}
104 {{ toYaml .Values.readinessProbe | indent 10 }}
110 #!/usr/bin/env bash -e
113 set -- -XGET -s --fail
115 if [ -n "${ELASTIC_USERNAME}" ] && [ -n "${ELASTIC_PASSWORD}" ]; then
116 set -- "$@" -u "${ELASTIC_USERNAME}:${ELASTIC_PASSWORD}"
119 curl -k "$@" "{{ .Values.protocol }}://localhost:{{ .Values.httpPort }}${path}"
122 http "{{ .Values.healthCheckPath }}"
124 - containerPort: {{ .Values.httpPort }}
126 {{ toYaml .Values.resources | indent 10 }}
128 {{- range .Values.secretMounts }}
130 mountPath: {{ .path }}
132 subPath: {{ .subPath }}
135 {{- range $path, $config := .Values.kibanaConfig }}
137 mountPath: /usr/share/kibana/config/{{ $path }}