Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

Commit 115e53d

Browse files
authored
[kibana] fix extra values default values (#1582)
Also add some additional test
1 parent 076176b commit 115e53d

File tree

3 files changed

+41
-6
lines changed

3 files changed

+41
-6
lines changed

kibana/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ as a reference. They are also used in the automated testing of this chart.
8383
| `automountToken` | Whether or not to automount the service account token in the Pod | `true` |
8484
| `elasticsearchHosts` | The URLs used to connect to Elasticsearch | `http://elasticsearch-master:9200` |
8585
| `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` |
86-
| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` |
86+
| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `[]` |
8787
| `extraEnvs` | Extra [environment variables][] which will be appended to the `env:` definition for the container | see [values.yaml][] |
88-
| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` |
89-
| `extraVolumeMounts` | Configuration for additional `volumeMounts` | see [values.yaml][] |
90-
| `extraVolumes` | Configuration for additional `volumes` | see [values.yaml][] |
88+
| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `[]` |
89+
| `extraVolumeMounts` | Configuration for additional `volumeMounts` | `[]` |
90+
| `extraVolumes` | Configuration for additional `volumes` | `[]` |
9191
| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to " `.Release.Name` - `.Values.nameOverride orChart.Name` " | `""` |
9292
| `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` |
9393
| `hostAliases` | Configurable [hostAliases][] | `[]` |

kibana/tests/kibana_test.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,22 @@ def test_adding_a_extra_container():
209209
} in extraContainer
210210

211211

212+
def test_adding_a_extra_container_as_yaml():
213+
config = """
214+
extraContainers:
215+
- name: do-something
216+
image: busybox
217+
command: ['do', 'something']
218+
"""
219+
r = helm_template(config)
220+
extraContainer = r["deployment"][name]["spec"]["template"]["spec"]["containers"]
221+
assert {
222+
"name": "do-something",
223+
"image": "busybox",
224+
"command": ["do", "something"],
225+
} in extraContainer
226+
227+
212228
def test_adding_a_extra_init_container():
213229
config = """
214230
extraInitContainers: |
@@ -227,6 +243,24 @@ def test_adding_a_extra_init_container():
227243
} in extraInitContainer
228244

229245

246+
def test_adding_a_extra_init_container_as_yaml():
247+
config = """
248+
extraInitContainers:
249+
- name: do-something
250+
image: busybox
251+
command: ['do', 'something']
252+
"""
253+
r = helm_template(config)
254+
extraInitContainer = r["deployment"][name]["spec"]["template"]["spec"][
255+
"initContainers"
256+
]
257+
assert {
258+
"name": "do-something",
259+
"image": "busybox",
260+
"command": ["do", "something"],
261+
} in extraInitContainer
262+
263+
230264
def test_adding_an_ingress_rule():
231265
config = """
232266
ingress:

kibana/values.yaml

100755100644
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,13 @@ extraVolumeMounts:
110110
# mountPath: /usr/share/extras
111111
# readOnly: true
112112
#
113-
extraContainers: ""
113+
114+
extraContainers: []
114115
# - name: dummy-init
115116
# image: busybox
116117
# command: ['echo', 'hey']
117118

118-
extraInitContainers: ""
119+
extraInitContainers: []
119120
# - name: dummy-init
120121
# image: busybox
121122
# command: ['echo', 'hey']

0 commit comments

Comments
 (0)