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

[kibana] fix extra values default values #1582

Merged
merged 2 commits into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions kibana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,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 @@ -110,12 +110,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