Skip to content

Commit c8ac756

Browse files
committed
Add extraContainers option
1 parent e545345 commit c8ac756

File tree

7 files changed

+121
-2
lines changed

7 files changed

+121
-2
lines changed

charts/dremio_v2/docs/Values-Reference.md

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,24 @@ extraInitContainers: |
235235
[...]
236236
```
237237

238+
#### `extraContainers`
239+
240+
Type: String
241+
242+
By default, this value is not set.
243+
244+
This value controls additional `containers` ("sidecars") that run alongside the standard containers in Dremio's pods. The value specified here may reference values specified in the built-in `Values` object in Helm.
245+
246+
For example, to have a `container` with the Dremio image, you can specify the following:
247+
248+
```yaml
249+
extraContainers: |
250+
- name: dremio-hello-world
251+
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
252+
command: ["echo", "Hello World"]
253+
[...]
254+
```
255+
238256
#### `extraVolumes`
239257

240258
Type: Array
@@ -572,6 +590,28 @@ coordinator:
572590

573591
More Info: Refer to the [`extraInitContainers`](#extrainitcontainers) section of this reference.
574592

593+
#### `coordinator.extraContainers`
594+
595+
Type: String
596+
597+
By default, this value is not set. If this value is omitted or set to an empty string, this value will be inherited from the top level `extraContainers`.
598+
599+
This value controls additional `containers` ("sidecars") that run alongside the standard containers in Dremio's coordinator pods. The value specified here may reference values specified in the `values.yaml` file.
600+
601+
For example, to have a `container` with the Dremio image, you can specify the following:
602+
603+
```yaml
604+
coordinator:
605+
[...]
606+
extraContainers: |
607+
- name: dremio-hello-world
608+
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
609+
command: ["echo", "Hello World"]
610+
[...]
611+
```
612+
613+
More Info: Refer to the [`extraContainers`](#extracontainers) section of this reference.
614+
575615
#### `coordinator.extraVolumes`
576616

577617
Type: Array
@@ -818,7 +858,7 @@ This value controls additional parameters passed to the Dremio process.
818858
For example, to pass an additional system property to the java process, you can specify the following:
819859

820860
```yaml
821-
coordinator:
861+
executor:
822862
[...]
823863
extraStartParams: >-
824864
-DsomeTestKey=someValue
@@ -838,7 +878,7 @@ This value controls additional `initContainers` that are started as part of the
838878
For example, to have an `initContainer` with the Dremio image, you can specify the following:
839879

840880
```yaml
841-
coordinator:
881+
executor:
842882
[...]
843883
extraInitContainers: |
844884
- name: dremio-hello-world
@@ -849,6 +889,28 @@ coordinator:
849889

850890
More Info: Refer to the [`extraInitContainers`](#extrainitcontainers) section of this reference.
851891

892+
#### `executor.extraContainers`
893+
894+
Type: String
895+
896+
By default, this value is not set. If this value is omitted or set to an empty string, this value will be inherited from the top level `extraContainers`.
897+
898+
This value controls additional `containers` ("sidecars") that run alongside the standard containers in Dremio's executor pods. The value specified here may reference values specified in the `values.yaml` file.
899+
900+
For example, to have a `container` with the Dremio image, you can specify the following:
901+
902+
```yaml
903+
executor:
904+
[...]
905+
extraContainers: |
906+
- name: dremio-hello-world
907+
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
908+
command: ["echo", "Hello World"]
909+
[...]
910+
```
911+
912+
More Info: Refer to the [`extraContainers`](#extracontainers) section of this reference.
913+
852914
#### `executor.extraVolumes`
853915

854916
Type: Array
@@ -939,6 +1001,11 @@ executor:
9391001
-DsomeTestKey=someValue
9401002
9411003
extraInitContainers: |
1004+
- name: dremio-hello-world-init
1005+
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
1006+
command: ["echo", "Hello World"]
1007+
1008+
extraContainers: |
9421009
- name: dremio-hello-world
9431010
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
9441011
command: ["echo", "Hello World"]

charts/dremio_v2/templates/_helpers_coordinator.tpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ Coordinator - Pod Extra Init Containers
5858
{{- end -}}
5959
{{- end -}}
6060

61+
{{/*
62+
Coordinator - Pod Extra Containers
63+
*/}}
64+
{{- define "dremio.coordinator.extraContainers" -}}
65+
{{- $coordinatorExtraContainers := coalesce $.Values.coordinator.extraContainers $.Values.extraContainers -}}
66+
{{- if $coordinatorExtraContainers -}}
67+
{{ tpl $coordinatorExtraContainers $ }}
68+
{{- end -}}
69+
{{- end -}}
70+
6171
{{/*
6272
Coordinator - Pod Extra Volume Mounts
6373
*/}}

charts/dremio_v2/templates/_helpers_executor.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,19 @@ Executor - Pod Extra Init Containers
124124
{{- end -}}
125125
{{- end -}}
126126

127+
{{/*
128+
Executor - Pod Extra Containers
129+
*/}}
130+
{{- define "dremio.executor.extraContainers" -}}
131+
{{- $context := index . 0 -}}
132+
{{- $engineName := index . 1 -}}
133+
{{- $engineConfiguration := default (dict) (get (default (dict) $context.Values.executor.engineOverride) $engineName) -}}
134+
{{- $engineExtraContainers := coalesce $engineConfiguration.extraContainers $context.Values.executor.extraContainers $context.Values.extraContainers -}}
135+
{{- if $engineExtraContainers -}}
136+
{{ tpl $engineExtraContainers $context }}
137+
{{- end -}}
138+
{{- end -}}
139+
127140
{{/*
128141
Executor - Pod Extra Volume Mounts
129142
*/}}

charts/dremio_v2/templates/dremio-coordinator.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ spec:
2828
{{- include "dremio.coordinator.nodeSelector" $ | nindent 6 }}
2929
{{- include "dremio.coordinator.tolerations" $ | nindent 6 }}
3030
containers:
31+
{{- include "dremio.coordinator.extraContainers" $ | nindent 6 }}
3132
- name: dremio-coordinator
3233
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
3334
imagePullPolicy: IfNotPresent

charts/dremio_v2/templates/dremio-executor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ spec:
3131
{{- include "dremio.executor.nodeSelector" (list $ $engineName) | nindent 6}}
3232
{{- include "dremio.executor.tolerations" (list $ $engineName) | nindent 6}}
3333
containers:
34+
{{- include "dremio.executor.extraContainers" (list $ $engineName) | nindent 6 }}
3435
- name: dremio-executor
3536
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
3637
imagePullPolicy: IfNotPresent

charts/dremio_v2/templates/dremio-master.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ spec:
3737
{{- include "dremio.coordinator.nodeSelector" $ | nindent 6 }}
3838
{{- include "dremio.coordinator.tolerations" $ | nindent 6 }}
3939
containers:
40+
{{- include "dremio.coordinator.extraContainers" $ | nindent 6 }}
4041
- name: dremio-master-coordinator
4142
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
4243
imagePullPolicy: IfNotPresent

charts/dremio_v2/values.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ coordinator:
6565
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
6666
# command: ["echo", "Hello World"]
6767

68+
# Extra Containers
69+
# Uncomment the below lines to use a custom set of extra containers for the coordinator.
70+
#extraContainers: |
71+
# - name: extra-container
72+
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
73+
# command: ["echo", "Hello World"]
74+
6875
# Extra Volumes
6976
# Uncomment below to use a custom set of extra volumes for the coordinator.
7077
#extraVolumes: []
@@ -155,6 +162,13 @@ executor:
155162
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
156163
# command: ["echo", "Hello World"]
157164

165+
# Extra Containers
166+
# Uncomment the below lines to use a custom set of extra containers for the executors.
167+
#extraContainers: |
168+
# - name: extra-container
169+
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
170+
# command: ["echo", "Hello World"]
171+
158172
# Extra Volumes
159173
# Uncomment below to use a custom set of extra volumes for executors.
160174
#extraVolumes: []
@@ -233,6 +247,11 @@ executor:
233247
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
234248
# command: ["echo", "Hello World"]
235249
#
250+
# extraContainers: |
251+
# - name: extra-container
252+
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
253+
# command: ["echo", "Hello World"]
254+
#
236255
#
237256
# extraVolumes: []
238257
# extraVolumeMounts: []
@@ -428,6 +447,13 @@ distStorage:
428447
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
429448
# command: ["echo", "Hello World"]
430449

450+
# Extra Containers
451+
# Uncomment the below lines to provide extra containers ("sidecars").
452+
#extraContainers: |
453+
# - name: extra-container
454+
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
455+
# command: ["echo", "Hello World"]
456+
431457
# Kubernetes Service Account
432458
# Uncomment the below line to provide a Kubernetes service account that Dremio should run with.
433459
#serviceAccount: ""

0 commit comments

Comments
 (0)