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

Commit

Permalink
[kibana] fix extra values default values (#1582) (#1596)
Browse files Browse the repository at this point in the history
Also add some additional test
  • Loading branch information
jmlrt authored Mar 2, 2022
1 parent 4ac9d38 commit 3d4c558
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
8 changes: 4 additions & 4 deletions kibana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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][] | `[]` |
Expand Down
34 changes: 34 additions & 0 deletions kibana/tests/kibana_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions kibana/values.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit 3d4c558

Please sign in to comment.