diff --git a/kibana/README.md b/kibana/README.md index 948e77d74..41472cfd6 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -85,11 +85,11 @@ as a reference. They are also used in the automated testing of this chart. | `automountToken` | Whether or not to automount the service account token in the Pod | `true` | | `elasticsearchHosts` | The URLs used to connect to Elasticsearch | `http://elasticsearch-master:9200` | | `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | -| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `[]` | | `extraEnvs` | Extra [environment variables][] which will be appended to the `env:` definition for the container | see [values.yaml][] | -| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `extraVolumeMounts` | Configuration for additional `volumeMounts` | see [values.yaml][] | -| `extraVolumes` | Configuration for additional `volumes` | see [values.yaml][] | +| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `[]` | +| `extraVolumeMounts` | Configuration for additional `volumeMounts` | `[]` | +| `extraVolumes` | Configuration for additional `volumes` | `[]` | | `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to " `.Release.Name` - `.Values.nameOverride orChart.Name` " | `""` | | `healthCheckPath` | The path used for the readinessProbe to check that Kibana is ready. If you are setting `server.basePath` you will also need to update this to `/${basePath}/app/kibana` | `/app/kibana` | | `hostAliases` | Configurable [hostAliases][] | `[]` | diff --git a/kibana/tests/kibana_test.py b/kibana/tests/kibana_test.py index 256cbf63a..fd76eb83b 100644 --- a/kibana/tests/kibana_test.py +++ b/kibana/tests/kibana_test.py @@ -209,6 +209,22 @@ def test_adding_a_extra_container(): } in extraContainer +def test_adding_a_extra_container_as_yaml(): + config = """ +extraContainers: + - name: do-something + image: busybox + command: ['do', 'something'] +""" + r = helm_template(config) + extraContainer = r["deployment"][name]["spec"]["template"]["spec"]["containers"] + assert { + "name": "do-something", + "image": "busybox", + "command": ["do", "something"], + } in extraContainer + + def test_adding_a_extra_init_container(): config = """ extraInitContainers: | @@ -227,6 +243,24 @@ def test_adding_a_extra_init_container(): } in extraInitContainer +def test_adding_a_extra_init_container_as_yaml(): + config = """ +extraInitContainers: + - name: do-something + image: busybox + command: ['do', 'something'] +""" + r = helm_template(config) + extraInitContainer = r["deployment"][name]["spec"]["template"]["spec"][ + "initContainers" + ] + assert { + "name": "do-something", + "image": "busybox", + "command": ["do", "something"], + } in extraInitContainer + + def test_adding_an_ingress_rule(): config = """ ingress: diff --git a/kibana/values.yaml b/kibana/values.yaml old mode 100755 new mode 100644 index 8f9382efe..ceb7d5729 --- a/kibana/values.yaml +++ b/kibana/values.yaml @@ -101,12 +101,13 @@ extraVolumeMounts: # mountPath: /usr/share/extras # readOnly: true # -extraContainers: "" + +extraContainers: [] # - name: dummy-init # image: busybox # command: ['echo', 'hey'] -extraInitContainers: "" +extraInitContainers: [] # - name: dummy-init # image: busybox # command: ['echo', 'hey']