|
1 | 1 | {{- if .Values.bootstrap.enabled -}}
|
2 | 2 | {{- range .Values.seed.indexes }}
|
| 3 | + |
| 4 | +{{- $config := $.Files.Get . | fromYaml }} |
| 5 | +{{- $index_id := $config.index_id }} |
3 | 6 | ---
|
4 | 7 | apiVersion: batch/v1
|
5 | 8 | kind: Job
|
6 | 9 | metadata:
|
7 |
| - name: {{ printf "%s-index-%s" (include "quickwit.fullname" $ | trunc 47) .index_id | trunc 63 | trimSuffix "-" }} |
| 10 | + name: {{ printf "%s-index-%s" (include "quickwit.fullname" $ | trunc 47) $index_id | trunc 63 | trimSuffix "-" }} |
8 | 11 | labels:
|
9 | 12 | {{- include "quickwit.labels" $ | nindent 4 }}
|
10 | 13 | annotations:
|
|
41 | 44 | {{- if $.Values.bootstrap.indexes.command }}
|
42 | 45 | command: {{- toYaml $.Values.bootstrap.sources.command | nindent 8 }}
|
43 | 46 | {{- else }}
|
44 |
| - command: ["/bin/bash","-c","quickwit index describe --index {{ .index_id }} --endpoint ${QW_CLUSTER_ENDPOINT} || quickwit index create --index-config {{ .index_id }}.yaml --endpoint ${QW_CLUSTER_ENDPOINT}"] |
| 47 | + command: ["/bin/bash","-c","quickwit index describe --index {{ $index_id }} --endpoint ${QW_CLUSTER_ENDPOINT} || quickwit index create --index-config {{ . }} --endpoint ${QW_CLUSTER_ENDPOINT}"] |
45 | 48 | {{- end }}
|
46 | 49 | env:
|
47 | 50 | {{- include "quickwit.environment" $ | nindent 10 }}
|
|
63 | 66 | mountPath: /quickwit/node.yaml
|
64 | 67 | subPath: node.yaml
|
65 | 68 | - name: index
|
66 |
| - mountPath: /quickwit/{{ .index_id }}.yaml |
67 |
| - subPath: {{ .index_id }}.yaml |
| 69 | + mountPath: /quickwit/{{ . }} |
| 70 | + subPath: {{ . }} |
68 | 71 | {{- with $.Values.bootstrap.indexes.extraVolumeMounts }}
|
69 | 72 | {{- toYaml . | nindent 10 }}
|
70 | 73 | {{- end }}
|
|
81 | 84 | configMap:
|
82 | 85 | name: {{ template "quickwit.fullname" $ }}-bootstrap
|
83 | 86 | items:
|
84 |
| - - key: {{ .index_id }}.yaml |
85 |
| - path: {{ .index_id }}.yaml |
| 87 | + - key: {{ . }} |
| 88 | + path: {{ . }} |
86 | 89 | {{- with $.Values.bootstrap.indexes.extraVolumes }}
|
87 | 90 | {{- toYaml . | nindent 8 }}
|
88 | 91 | {{- end }}
|
|
0 commit comments