@@ -48,14 +48,6 @@ app.kubernetes.io/name: {{ include "influxdb3-enterprise.name" . }}
4848app.kubernetes.io /instance: {{ .Release.Name }}
4949{{- end }}
5050
51- {{/*
52- Component labels
53- */ }}
54- {{- define " influxdb3-enterprise.componentLabels" -}}
55- {{ include " influxdb3-enterprise.labels" . }}
56- app.kubernetes.io /component: {{ .component }}
57- {{- end }}
58-
5951{{/*
6052Service account name
6153*/ }}
@@ -93,6 +85,17 @@ License secret name
9385{{- end }}
9486{{- end }}
9587
88+ {{/*
89+ Validate object storage type
90+ */ }}
91+ {{- define " influxdb3-enterprise.validateObjectStorageType" -}}
92+ {{- $type := default " s3" .Values.objectStorage.type -}}
93+ {{- $valid := list " s3" " azure" " google" " file" " memory" " memory-throttled" -}}
94+ {{- if not (has $type $valid ) -}}
95+ {{- fail (printf " Invalid objectStorage.type: %s . Must be one of: %s " $type (join " , " $valid )) -}}
96+ {{- end -}}
97+ {{- end }}
98+
9699{{/*
97100License checksum (handles existingSecret via lookup)
98101*/ }}
@@ -116,152 +119,6 @@ TLS secret name
116119{{- end }}
117120{{- end }}
118121
119- {{/*
120- HTTP/TLS/Auth environment (shared across components)
121- */ }}
122- {{- define " influxdb3-enterprise.httpEnv" -}}{{- end }}
123-
124- {{/*
125- Cluster environment (shared across components)
126- */ }}
127- {{- define " influxdb3-enterprise.clusterEnv" -}}{{- end }}
128-
129- {{/*
130- Caching environment (shared across components)
131- */ }}
132- {{- define " influxdb3-enterprise.cachingEnv" -}}
133- {{- with .Values.caching }}
134- {{- if .parquetMemCacheSize }}
135- - name: INFLUXDB3_PARQUET_MEM_CACHE_SIZE
136- value: {{ .parquetMemCacheSize | quote }}
137- {{- end }}
138- {{- if .parquetMemCacheQueryPathDuration }}
139- - name: INFLUXDB3_PARQUET_MEM_CACHE_QUERY_PATH_DURATION
140- value: {{ .parquetMemCacheQueryPathDuration | quote }}
141- {{- end }}
142- {{- if .parquetMemCachePrunePercentage }}
143- - name: INFLUXDB3_PARQUET_MEM_CACHE_PRUNE_PERCENTAGE
144- value: {{ .parquetMemCachePrunePercentage | quote }}
145- {{- end }}
146- {{- if .parquetMemCachePruneInterval }}
147- - name: INFLUXDB3_PARQUET_MEM_CACHE_PRUNE_INTERVAL
148- value: {{ .parquetMemCachePruneInterval | quote }}
149- {{- end }}
150- {{- if hasKey . " disableParquetMemCache" }}
151- - name: INFLUXDB3_DISABLE_PARQUET_MEM_CACHE
152- value: {{ ternary " true" " false" .disableParquetMemCache | quote }}
153- {{- end }}
154- {{- if .preemptiveCacheAge }}
155- - name: INFLUXDB3_PREEMPTIVE_CACHE_AGE
156- value: {{ .preemptiveCacheAge | quote }}
157- {{- end }}
158- {{- if hasKey . " lastValueCacheDisableFromHistory" }}
159- - name: INFLUXDB3_ENTERPRISE_LAST_VALUE_CACHE_DISABLE_FROM_HISTORY
160- value: {{ ternary " true" " false" .lastValueCacheDisableFromHistory | quote }}
161- {{- end }}
162- {{- if .lastCacheEvictionInterval }}
163- - name: INFLUXDB3_LAST_CACHE_EVICTION_INTERVAL
164- value: {{ .lastCacheEvictionInterval | quote }}
165- {{- end }}
166- {{- if hasKey . " distinctValueCacheDisableFromHistory" }}
167- - name: INFLUXDB3_ENTERPRISE_DISTINCT_VALUE_CACHE_DISABLE_FROM_HISTORY
168- value: {{ ternary " true" " false" .distinctValueCacheDisableFromHistory | quote }}
169- {{- end }}
170- {{- if .distinctCacheEvictionInterval }}
171- - name: INFLUXDB3_DISTINCT_CACHE_EVICTION_INTERVAL
172- value: {{ .distinctCacheEvictionInterval | quote }}
173- {{- end }}
174- {{- if .tableIndexCacheMaxEntries }}
175- - name: INFLUXDB3_TABLE_INDEX_CACHE_MAX_ENTRIES
176- value: {{ .tableIndexCacheMaxEntries | quote }}
177- {{- end }}
178- {{- if .tableIndexCacheConcurrencyLimit }}
179- - name: INFLUXDB3_TABLE_INDEX_CACHE_CONCURRENCY_LIMIT
180- value: {{ .tableIndexCacheConcurrencyLimit | quote }}
181- {{- end }}
182- {{- end }}
183- {{- end }}
184-
185- {{/*
186- Logs environment (shared across components)
187- */ }}
188- {{- define " influxdb3-enterprise.logsEnv" -}}
189- {{- $logs := default (dict) .Values.logs }}
190- - name: LOG_DESTINATION
191- value: {{ default " stdout" (default ($logs .logDestination ) ($logs .destination )) | quote }}
192- - name: LOG_FORMAT
193- value: {{ default " full" (default ($logs .logFormat ) ($logs .format )) | quote }}
194- {{- if $logs .logFilter }}
195- - name: LOG_FILTER
196- value: {{ $logs .logFilter | quote }}
197- {{- end }}
198- - name: INFLUXDB3_QUERY_LOG_SIZE
199- value: {{ default 1000 ($logs .queryLogSize ) | quote }}
200- {{- end }}
201-
202- {{/*
203- Object storage environment (shared across components)
204- */ }}
205- {{- define " influxdb3-enterprise.objectStoreEnv" -}}
206- - name: INFLUXDB3_OBJECT_STORE
207- value: {{ .Values.objectStorage.type | quote }}
208- {{- if eq .Values.objectStorage.type " file" }}
209- - name: INFLUXDB3_DB_DIR
210- value: {{ .Values.objectStorage.file.dataDir | quote }}
211- {{- else }}
212- - name: INFLUXDB3_BUCKET
213- value: {{ .Values.objectStorage.bucket | quote }}
214- {{- if .Values.objectStorage.connectionLimit }}
215- - name: OBJECT_STORE_CONNECTION_LIMIT
216- value: {{ .Values.objectStorage.connectionLimit | quote }}
217- {{- end }}
218- {{- if hasKey .Values.objectStorage " http2Only" }}
219- - name: OBJECT_STORE_HTTP2_ONLY
220- value: {{ ternary " true" " false" .Values.objectStorage.http2Only | quote }}
221- {{- end }}
222- {{- if .Values.objectStorage.http2MaxFrameSize }}
223- - name: OBJECT_STORE_HTTP2_MAX_FRAME_SIZE
224- value: {{ .Values.objectStorage.http2MaxFrameSize | quote }}
225- {{- end }}
226- {{- if .Values.objectStorage.maxRetries }}
227- - name: OBJECT_STORE_MAX_RETRIES
228- value: {{ .Values.objectStorage.maxRetries | quote }}
229- {{- end }}
230- {{- if .Values.objectStorage.retryTimeout }}
231- - name: OBJECT_STORE_RETRY_TIMEOUT
232- value: {{ .Values.objectStorage.retryTimeout | quote }}
233- {{- end }}
234- {{- if .Values.objectStorage.cacheEndpoint }}
235- - name: OBJECT_STORE_CACHE_ENDPOINT
236- value: {{ .Values.objectStorage.cacheEndpoint | quote }}
237- {{- end }}
238- {{- if eq .Values.objectStorage.type " s3" }}
239- - name: AWS_DEFAULT_REGION
240- value: {{ .Values.objectStorage.s3.region | quote }}
241- {{- if .Values.objectStorage.s3.endpoint }}
242- - name: AWS_ENDPOINT
243- value: {{ .Values.objectStorage.s3.endpoint | quote }}
244- {{- end }}
245- {{- if .Values.objectStorage.s3.allowHttp }}
246- - name: AWS_ALLOW_HTTP
247- value: " true"
248- {{- end }}
249- {{- else if eq .Values.objectStorage.type " azure" }}
250- {{- if .Values.objectStorage.azure.endpoint }}
251- - name: AZURE_ENDPOINT
252- value: {{ .Values.objectStorage.azure.endpoint | quote }}
253- {{- end }}
254- {{- if .Values.objectStorage.azure.allowHttp }}
255- - name: AZURE_ALLOW_HTTP
256- value: " true"
257- {{- end }}
258- {{- else if eq .Values.objectStorage.type " google" }}
259- - name: GOOGLE_SERVICE_ACCOUNT
260- value: " /var/secrets/google/service-account.json"
261- {{- end }}
262- {{- end }}
263- {{- end }}
264-
265122{{- define " influxdb3-enterprise.objectStoreSecretEnv" -}}
266123{{- if eq .Values.objectStorage.type " s3" }}
267124 {{- if or .Values.objectStorage.s3.existingSecret (and .Values.objectStorage.s3.accessKeyId .Values.objectStorage.s3.secretAccessKey ) }}
@@ -298,7 +155,7 @@ Object storage environment (shared across components)
298155{{- end }}
299156{{- end }}
300157
301- {{/*
158+ {{/*
302159License environment (shared across components)
303160*/ }}
304161{{- define " influxdb3-enterprise.licenseEnv" -}}
@@ -310,12 +167,9 @@ License environment (shared across components)
310167 name: {{ include " influxdb3-enterprise.licenseSecretName" . }}
311168 key: license-email
312169{{- end }}
313- {{- if .Values.license.file }}
170+ {{- if or .Values.license.file .Values.license.existingSecret }}
314171- name: INFLUXDB3_ENTERPRISE_LICENSE_FILE
315- valueFrom:
316- secretKeyRef:
317- name: {{ include " influxdb3-enterprise.licenseSecretName" . }}
318- key: license-file
172+ value: " /etc/influxdb/license"
319173{{- end }}
320174- name: INFLUXDB3_ENTERPRISE_LICENSE_TYPE
321175 value: {{ .Values.license.type | quote }}
@@ -373,9 +227,15 @@ Shared volume mounts (license/TLS/GCS and user extras)
373227 mountPath: /var/secrets/google
374228 readOnly: true
375229{{- end }}
230+ {{- if and (eq .Values.objectStorage.type " s3" ) .Values.objectStorage.s3.credentialsFile }}
231+ - name: aws-credentials
232+ mountPath: /etc/influxdb/aws
233+ readOnly: true
234+ {{- end }}
376235{{- if or .Values.license.file .Values.license.existingSecret }}
377236- name: license
378237 mountPath: /etc/influxdb/license
238+ subPath: license
379239 readOnly: true
380240{{- end }}
381241{{- if .Values.security.tls.enabled }}
@@ -405,6 +265,14 @@ Shared volumes (license/TLS/GCS and user extras)
405265 - key: service-account.json
406266 path: service-account.json
407267{{- end }}
268+ {{- if and (eq .Values.objectStorage.type " s3" ) .Values.objectStorage.s3.credentialsFile }}
269+ - name: aws-credentials
270+ secret:
271+ secretName: {{ include " influxdb3-enterprise.fullname" . }}-aws-credentials
272+ items:
273+ - key: credentials
274+ path: credentials
275+ {{- end }}
408276{{- if or .Values.license.file .Values.license.existingSecret }}
409277- name: license
410278 secret:
0 commit comments