From fbf62494ff211cbbbfdf8210ba20d298ba6f4150 Mon Sep 17 00:00:00 2001 From: Vasilis Remmas Date: Wed, 29 Jan 2020 14:51:21 +0100 Subject: [PATCH] Add extraInitContainers to filebeat chart --- filebeat/README.md | 1 + filebeat/templates/daemonset.yaml | 4 ++++ filebeat/values.yaml | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/filebeat/README.md b/filebeat/README.md index 702984ea4..1655a2b87 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -60,6 +60,7 @@ helm install --name filebeat elastic/filebeat --set imageTag=7.5.2 | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | | `filebeatConfig` | Allows you to add any config files in `/usr/share/filebeat` such as `filebeat.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/filebeat/values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](https://github.com/elastic/helm-charts/tree/master/filebeat/values.yaml) | | `extraEnvs` | Extra [environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config) which will be appended to the `env:` definition for the container | `[]` | +| `extraInitContainers` | List of additional init containers to be added at the Daemonset | `[]` | | `extraVolumeMounts` | List of additional volumeMounts to be mounted on the Daemonset | `[]` | | `extraVolumes` | List of additional volumes to be mounted on the Daemonset | `[]` | | `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` definition for the container | `[]` | diff --git a/filebeat/templates/daemonset.yaml b/filebeat/templates/daemonset.yaml index 207b0fa8a..0132cb2f5 100644 --- a/filebeat/templates/daemonset.yaml +++ b/filebeat/templates/daemonset.yaml @@ -84,6 +84,10 @@ spec: {{- if .Values.imagePullSecrets }} imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} + {{- end }} + {{- if .Values.extraInitContainers }} + initContainers: +{{ toYaml .Values.extraInitContainers | indent 8 }} {{- end }} containers: - name: "filebeat" diff --git a/filebeat/values.yaml b/filebeat/values.yaml index 6cce7feb5..548d72650 100755 --- a/filebeat/values.yaml +++ b/filebeat/values.yaml @@ -30,6 +30,11 @@ extraVolumes: [] # - name: extras # emptyDir: {} +extraInitContainers: [] +# - name: dummy-init +# image: busybox +# command: ['echo', 'hey'] + envFrom: [] # - configMapRef: # name: configmap-name