4 name: {{ include "influxdb.fullname" . }}
6 {{- include "influxdb.labels" . | nindent 4 }}
8 {{- if .Values.enterprise.enabled }}
9 replicas: {{ .Values.enterprise.clusterSize }}
15 {{- include "influxdb.selectorLabels" . | nindent 6 }}
16 serviceName: "{{ include "influxdb.fullname" . }}"
20 {{- include "influxdb.selectorLabels" . | nindent 8 }}
21 {{- if .Values.podAnnotations }}
23 {{ toYaml .Values.podAnnotations | indent 8 }}
26 {{- if .Values.schedulerName }}
27 schedulerName: "{{ .Values.schedulerName }}"
29 {{- if .Values.nodeSelector }}
31 {{ toYaml .Values.nodeSelector | indent 8 }}
33 {{- if .Values.affinity }}
35 {{ toYaml .Values.affinity | indent 8 }}
37 {{- if .Values.tolerations }}
39 {{ toYaml .Values.tolerations | indent 8 }}
41 {{- if .Values.securityContext }}
43 {{ toYaml .Values.securityContext | indent 8 }}
45 {{- if .Values.image.pullSecrets }}
47 {{- range .Values.image.pullSecrets }}
51 serviceAccountName: {{ include "influxdb.serviceAccountName" . }}
53 - name: {{ include "influxdb.fullname" . }}
54 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
55 imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
57 {{ toYaml .Values.resources | indent 10 }}
60 containerPort: {{ .Values.config.http.bind_address | default 8086 }}
61 {{- if .Values.config.graphite.enabled }}
63 containerPort: {{ .Values.config.graphite.bind_address | default 2003 }}
65 {{- if .Values.config.collectd.enabled }}
67 containerPort: {{ .Values.config.collectd.bind_address | default 25826 }}
70 {{- if .Values.config.udp.enabled }}
72 containerPort: {{ .Values.config.udp.bind_address | default 8089 }}
75 {{- if .Values.config.opentsdb.enabled }}
77 containerPort: {{ .Values.config.opentsdb.bind_address | default 4242 }}
80 containerPort: {{ .Values.config.rpc.bind_address | default 8088 }}
81 {{- if .Values.enterprise.enabled }}
83 containerPort: {{ .Values.config.meta.bind_address | default 8091 }}
87 {{ toYaml .Values.env | indent 10 }}
88 {{- if .Values.enterprise.enabled }}
89 - name: INFLUXDB_HOSTNAME # Values.env's HOSTNAME isn't fundamentally different from $HOSTNAME, but this way weg get a distinguished name at runtime.
90 value: "$(_HOSTNAME).{{ include "influxdb.fullname" . }}"
93 {{- if .Values.envFromSecret }}
96 name: {{ .Values.envFromSecret }}
100 path: {{ .Values.livenessProbe.path | default "/ping" }}
102 scheme: {{ .Values.livenessProbe.scheme | default "HTTP" }}
103 initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 30 }}
104 timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 5 }}
107 path: {{ .Values.readinessProbe.path | default "/ping" }}
109 scheme: {{ .Values.readinessProbe.scheme | default "HTTP" }}
110 initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds | default 5 }}
111 timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds | default 1 }}
112 {{- if .Values.startupProbe.enabled }}
115 path: {{ .Values.startupProbe.path | default "/ping" }}
117 scheme: {{ .Values.startupProbe.scheme | default "HTTP" }}
118 failureThreshold: {{ .Values.startupProbe.failureThreshold | default 6 }}
119 periodSeconds: {{ .Values.startupProbe.periodSeconds | default 5 }}
122 - name: {{ include "influxdb.fullname" . }}-data
123 mountPath: /var/lib/influxdb
125 mountPath: /etc/influxdb
126 {{- if .Values.initScripts.enabled }}
128 mountPath: /docker-entrypoint-initdb.d
130 {{- if .Values.mountPoints }}
131 {{ toYaml .Values.mountPoints | indent 8 }}
133 {{- if .Values.extraContainers }}
134 {{ toYaml .Values.extraContainers | indent 6}}
139 name: {{ include "influxdb.fullname" . }}
140 {{- if .Values.initScripts.enabled }}
143 name: {{ include "influxdb.fullname" . }}-init
145 {{- if (not .Values.persistence.enabled ) }}
146 - name: {{ include "influxdb.fullname" . }}-data
149 # Cannot use existing claim in enterprise mode
150 {{- if and .Values.persistence.enabled .Values.persistence.existingClaim (not .Values.enterprise.enabled) }}
151 - name: {{ include "influxdb.fullname" . }}-data
152 persistentVolumeClaim:
153 claimName: {{ .Values.persistence.existingClaim }}
155 {{- if .Values.volumes }}
156 {{ toYaml .Values.volumes | indent 6 }}
158 # Must use volume claim template in enterprise mode
159 {{- if and .Values.persistence.enabled (or (not .Values.persistence.existingClaim) .Values.enterprise.enabled) }}
160 volumeClaimTemplates:
162 name: {{ include "influxdb.fullname" . }}-data
164 {{- range $key, $value := .Values.persistence.annotations }}
165 {{ $key }}: "{{ $value }}"
169 - {{ .Values.persistence.accessMode | quote}}
172 storage: {{ .Values.persistence.size | quote }}
173 {{- if .Values.persistence.storageClass }}
174 {{- if (eq "-" .Values.persistence.storageClass) }}
177 storageClassName: "{{ .Values.persistence.storageClass }}"