1 ################################################################################
2 # Copyright (c) 2021 HCL Technolgies Limited. #
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 ################################################################################
16 {{- if .Values.enterprise.enabled }}
20 name: {{ include "common.fullname.influxdb" . }}-meta
22 {{- include "common.influxdb.labels" . | nindent 4 }}
23 app.kubernetes.io/component: meta
25 replicas: {{ .Values.enterprise.meta.clusterSize }}
28 {{- include "common.influxdb.selectorLabels" . | nindent 6 }}
29 app.kubernetes.io/component: meta
30 serviceName: "{{ include "common.fullname.influxdb" . }}-meta"
34 {{- include "common.influxdb.selectorLabels" . | nindent 8 }}
35 app.kubernetes.io/component: meta
36 {{- if .Values.podAnnotations }}
38 {{ toYaml .Values.podAnnotations | indent 8 }}
41 {{- if .Values.image.pullSecrets }}
43 {{- range .Values.image.pullSecrets }}
47 serviceAccountName: {{ include "common.influxdb.serviceAccountName" . }}
49 - name: "{{ include "common.fullname.influxdb" . }}-meta"
50 image: "{{ .Values.image.repository }}:{{ .Values.enterprise.meta.image.tag }}"
51 imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
53 {{ toYaml .Values.enterprise.meta.resources | indent 10 }}
56 containerPort: {{ include "common.serviceport.influxdb.udp.bind_address" . | default 8089 }}
58 containerPort: {{ include "common.serviceport.influxdb.rpc.bind_address" . | default 8088 }}
60 containerPort: {{ include "common.serviceport.influxdb.meta.bind_address" . | default 8091 }}
63 {{ toYaml .Values.env | indent 10 }}
64 # Values.env's HOSTNAME isn't fundamentally different from $HOSTNAME, but this way we get a distinguished name for InfluxDB at runtime.
65 - name: INFLUXDB_HOSTNAME
66 value: "$(_HOSTNAME).{{ include "common.fullname.influxdb" . }}-meta"
70 path: {{ .Values.livenessProbe.path | default "/ping" }}
72 initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 30 }}
73 timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 5 }}
76 path: {{ .Values.readinessProbe.path | default "/ping" }}
78 initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds | default 5 }}
79 timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds | default 1 }}
80 {{- if .Values.startupProbe.enabled }}
83 path: {{ .Values.startupProbe.path | default "/ping" }}
85 failureThreshold: {{ .Values.startupProbe.failureThreshold | default 6 }}
86 periodSeconds: {{ .Values.startupProbe.periodSeconds | default 5 }}
89 - name: {{ include "common.fullname.influxdb" . }}-meta
90 mountPath: /var/lib/influxdb
92 mountPath: /etc/influxdb
93 {{- if .Values.initScripts.enabled }}
95 mountPath: /docker-entrypoint-initdb.d
100 name: {{ include "common.fullname.influxdb" . }}-meta
101 {{- if .Values.initScripts.enabled }}
104 name: {{ include "common.fullname.influxdb" . }}-init
106 {{- if (not .Values.persistence.enabled ) }}
107 - name: {{ include "common.fullname.influxdb" . }}-meta
110 {{- if .Values.schedulerName }}
111 schedulerName: "{{ .Values.schedulerName }}"
113 {{- if .Values.nodeSelector }}
115 {{ toYaml .Values.nodeSelector | indent 8 }}
117 {{- if .Values.affinity }}
119 {{ toYaml .Values.affinity | indent 8 }}
121 {{- if .Values.tolerations }}
123 {{ toYaml .Values.tolerations | indent 8 }}
125 {{- if .Values.persistence.enabled }}
126 volumeClaimTemplates:
128 name: {{ include "common.fullname.influxdb" . }}-meta
130 {{- range $key, $value := .Values.persistence.annotations }}
131 {{ $key }}: "{{ $value }}"
135 - {{ .Values.persistence.accessMode | quote}}
138 storage: {{ .Values.persistence.size | quote }}
139 {{- if .Values.persistence.storageClass }}
140 {{- if (eq "-" .Values.persistence.storageClass) }}
143 storageClassName: "{{ .Values.persistence.storageClass }}"