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

[Kibana] Add loadbalancerIP to service spec in kibana #726

Merged
merged 2 commits into from
Jul 16, 2020
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
3 changes: 3 additions & 0 deletions kibana/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ metadata:
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
{{- with .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml . | indent 4 }}
Expand Down
14 changes: 14 additions & 0 deletions kibana/tests/kibana_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def test_defaults():
# Make sure that the default 'loadBalancerSourceRanges' list is empty
assert "loadBalancerSourceRanges" not in r["service"][name]["spec"]

# Make sure that the default 'loadBalancerIP' string is empty
assert "loadBalancerIP" not in r["service"][name]["spec"]


def test_overriding_the_elasticsearch_hosts():
config = """
Expand Down Expand Up @@ -615,3 +618,14 @@ def test_setting_fullnameOverride():
]
== "kibana"
)


def test_adding_loadBalancerIP():
config = """
service:
loadBalancerIP: 12.5.11.79
"""

r = helm_template(config)

assert r["service"][name]["spec"]["loadBalancerIP"] == "12.5.11.79"
1 change: 1 addition & 0 deletions kibana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ updateStrategy:

service:
type: ClusterIP
loadBalancerIP: ""
port: 5601
nodePort: ""
labels: {}
Expand Down