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

Commit

Permalink
[Kibana] Add loadbalancerIP to service spec in kibana (#726)
Browse files Browse the repository at this point in the history
  • Loading branch information
debojitkakoti authored and jmlrt committed Jul 16, 2020
1 parent a77a3c5 commit 2eefa30
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
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

0 comments on commit 2eefa30

Please sign in to comment.