diff --git a/charts/dremio_v2/docs/Values-Reference.md b/charts/dremio_v2/docs/Values-Reference.md index 75e4ac64..511a8f19 100644 --- a/charts/dremio_v2/docs/Values-Reference.md +++ b/charts/dremio_v2/docs/Values-Reference.md @@ -235,6 +235,24 @@ extraInitContainers: | [...] ``` +#### `extraContainers` + +Type: String + +By default, this value is not set. + +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. + +For example, to have a `container` with the Dremio image, you can specify the following: + +```yaml +extraContainers: | + - name: dremio-hello-world + image: {{ $.Values.image }}:{{ $.Values.imageTag }} + command: ["echo", "Hello World"] +[...] +``` + #### `extraVolumes` Type: Array @@ -572,6 +590,28 @@ coordinator: More Info: Refer to the [`extraInitContainers`](#extrainitcontainers) section of this reference. +#### `coordinator.extraContainers` + +Type: String + +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`. + +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. + +For example, to have a `container` with the Dremio image, you can specify the following: + +```yaml +coordinator: + [...] + extraContainers: | + - name: dremio-hello-world + image: {{ $.Values.image }}:{{ $.Values.imageTag }} + command: ["echo", "Hello World"] +[...] +``` + +More Info: Refer to the [`extraContainers`](#extracontainers) section of this reference. + #### `coordinator.extraVolumes` Type: Array @@ -818,7 +858,7 @@ This value controls additional parameters passed to the Dremio process. For example, to pass an additional system property to the java process, you can specify the following: ```yaml -coordinator: +executor: [...] extraStartParams: >- -DsomeTestKey=someValue @@ -838,7 +878,7 @@ This value controls additional `initContainers` that are started as part of the For example, to have an `initContainer` with the Dremio image, you can specify the following: ```yaml -coordinator: +executor: [...] extraInitContainers: | - name: dremio-hello-world @@ -849,6 +889,28 @@ coordinator: More Info: Refer to the [`extraInitContainers`](#extrainitcontainers) section of this reference. +#### `executor.extraContainers` + +Type: String + +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`. + +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. + +For example, to have a `container` with the Dremio image, you can specify the following: + +```yaml +executor: + [...] + extraContainers: | + - name: dremio-hello-world + image: {{ $.Values.image }}:{{ $.Values.imageTag }} + command: ["echo", "Hello World"] +[...] +``` + +More Info: Refer to the [`extraContainers`](#extracontainers) section of this reference. + #### `executor.extraVolumes` Type: Array @@ -939,6 +1001,11 @@ executor: -DsomeTestKey=someValue extraInitContainers: | + - name: dremio-hello-world-init + image: {{ $.Values.image }}:{{ $.Values.imageTag }} + command: ["echo", "Hello World"] + + extraContainers: | - name: dremio-hello-world image: {{ $.Values.image }}:{{ $.Values.imageTag }} command: ["echo", "Hello World"] diff --git a/charts/dremio_v2/templates/_helpers_coordinator.tpl b/charts/dremio_v2/templates/_helpers_coordinator.tpl index 81cd5d29..e950d945 100644 --- a/charts/dremio_v2/templates/_helpers_coordinator.tpl +++ b/charts/dremio_v2/templates/_helpers_coordinator.tpl @@ -58,6 +58,16 @@ Coordinator - Pod Extra Init Containers {{- end -}} {{- end -}} +{{/* +Coordinator - Pod Extra Containers +*/}} +{{- define "dremio.coordinator.extraContainers" -}} +{{- $coordinatorExtraContainers := coalesce $.Values.coordinator.extraContainers $.Values.extraContainers -}} +{{- if $coordinatorExtraContainers -}} +{{ tpl $coordinatorExtraContainers $ }} +{{- end -}} +{{- end -}} + {{/* Coordinator - Pod Extra Volume Mounts */}} diff --git a/charts/dremio_v2/templates/_helpers_executor.tpl b/charts/dremio_v2/templates/_helpers_executor.tpl index d8ae6d21..4bcf7218 100644 --- a/charts/dremio_v2/templates/_helpers_executor.tpl +++ b/charts/dremio_v2/templates/_helpers_executor.tpl @@ -124,6 +124,19 @@ Executor - Pod Extra Init Containers {{- end -}} {{- end -}} +{{/* +Executor - Pod Extra Containers +*/}} +{{- define "dremio.executor.extraContainers" -}} +{{- $context := index . 0 -}} +{{- $engineName := index . 1 -}} +{{- $engineConfiguration := default (dict) (get (default (dict) $context.Values.executor.engineOverride) $engineName) -}} +{{- $engineExtraContainers := coalesce $engineConfiguration.extraContainers $context.Values.executor.extraContainers $context.Values.extraContainers -}} +{{- if $engineExtraContainers -}} +{{ tpl $engineExtraContainers $context }} +{{- end -}} +{{- end -}} + {{/* Executor - Pod Extra Volume Mounts */}} diff --git a/charts/dremio_v2/templates/dremio-coordinator.yaml b/charts/dremio_v2/templates/dremio-coordinator.yaml index dc5d8426..62655664 100644 --- a/charts/dremio_v2/templates/dremio-coordinator.yaml +++ b/charts/dremio_v2/templates/dremio-coordinator.yaml @@ -28,6 +28,7 @@ spec: {{- include "dremio.coordinator.nodeSelector" $ | nindent 6 }} {{- include "dremio.coordinator.tolerations" $ | nindent 6 }} containers: + {{- include "dremio.coordinator.extraContainers" $ | nindent 6 }} - name: dremio-coordinator image: {{ $.Values.image }}:{{ $.Values.imageTag }} imagePullPolicy: IfNotPresent diff --git a/charts/dremio_v2/templates/dremio-executor.yaml b/charts/dremio_v2/templates/dremio-executor.yaml index fffdc53c..c2e221e1 100644 --- a/charts/dremio_v2/templates/dremio-executor.yaml +++ b/charts/dremio_v2/templates/dremio-executor.yaml @@ -31,6 +31,7 @@ spec: {{- include "dremio.executor.nodeSelector" (list $ $engineName) | nindent 6}} {{- include "dremio.executor.tolerations" (list $ $engineName) | nindent 6}} containers: + {{- include "dremio.executor.extraContainers" (list $ $engineName) | nindent 6 }} - name: dremio-executor image: {{ $.Values.image }}:{{ $.Values.imageTag }} imagePullPolicy: IfNotPresent diff --git a/charts/dremio_v2/templates/dremio-master.yaml b/charts/dremio_v2/templates/dremio-master.yaml index f2f9b792..a12f9999 100644 --- a/charts/dremio_v2/templates/dremio-master.yaml +++ b/charts/dremio_v2/templates/dremio-master.yaml @@ -37,6 +37,7 @@ spec: {{- include "dremio.coordinator.nodeSelector" $ | nindent 6 }} {{- include "dremio.coordinator.tolerations" $ | nindent 6 }} containers: + {{- include "dremio.coordinator.extraContainers" $ | nindent 6 }} - name: dremio-master-coordinator image: {{ $.Values.image }}:{{ $.Values.imageTag }} imagePullPolicy: IfNotPresent diff --git a/charts/dremio_v2/values.yaml b/charts/dremio_v2/values.yaml index 475114f3..78ac4664 100644 --- a/charts/dremio_v2/values.yaml +++ b/charts/dremio_v2/values.yaml @@ -65,6 +65,13 @@ coordinator: # image: {{ $.Values.image }}:{{ $.Values.imageTag }} # command: ["echo", "Hello World"] + # Extra Containers + # Uncomment the below lines to use a custom set of extra containers for the coordinator. + #extraContainers: | + # - name: extra-container + # image: {{ $.Values.image }}:{{ $.Values.imageTag }} + # command: ["echo", "Hello World"] + # Extra Volumes # Uncomment below to use a custom set of extra volumes for the coordinator. #extraVolumes: [] @@ -155,6 +162,13 @@ executor: # image: {{ $.Values.image }}:{{ $.Values.imageTag }} # command: ["echo", "Hello World"] + # Extra Containers + # Uncomment the below lines to use a custom set of extra containers for the executors. + #extraContainers: | + # - name: extra-container + # image: {{ $.Values.image }}:{{ $.Values.imageTag }} + # command: ["echo", "Hello World"] + # Extra Volumes # Uncomment below to use a custom set of extra volumes for executors. #extraVolumes: [] @@ -233,6 +247,11 @@ executor: # image: {{ $.Values.image }}:{{ $.Values.imageTag }} # command: ["echo", "Hello World"] # + # extraContainers: | + # - name: extra-container + # image: {{ $.Values.image }}:{{ $.Values.imageTag }} + # command: ["echo", "Hello World"] + # # # extraVolumes: [] # extraVolumeMounts: [] @@ -428,6 +447,13 @@ distStorage: # image: {{ $.Values.image }}:{{ $.Values.imageTag }} # command: ["echo", "Hello World"] +# Extra Containers +# Uncomment the below lines to provide extra containers ("sidecars"). +#extraContainers: | +# - name: extra-container +# image: {{ $.Values.image }}:{{ $.Values.imageTag }} +# command: ["echo", "Hello World"] + # Kubernetes Service Account # Uncomment the below line to provide a Kubernetes service account that Dremio should run with. #serviceAccount: ""