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

Commit

Permalink
[kibana] add service.httpPortName config in chart (elastic#843)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com>
  • Loading branch information
ebuildy and jmlrt committed Dec 1, 2020
1 parent 7c69a50 commit 4ad3e8a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kibana/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
nodePort: {{ .Values.service.nodePort }}
{{- end }}
protocol: TCP
name: http
name: {{ .Values.service.httpPortName | default "http" }}
targetPort: {{ .Values.httpPort }}
selector:
app: {{ .Chart.Name }}
Expand Down
13 changes: 13 additions & 0 deletions kibana/tests/kibana_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,3 +629,16 @@ def test_adding_loadBalancerIP():
r = helm_template(config)

assert r["service"][name]["spec"]["loadBalancerIP"] == "12.5.11.79"


def test_service_port_name():
r = helm_template("")

config = """
service:
httpPortName: istio
"""

r = helm_template(config)

assert r["service"][name]["spec"]["ports"][0]["name"] == "istio"
1 change: 1 addition & 0 deletions kibana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ service:
# service.beta.kubernetes.io/cce-load-balancer-internal-vpc: "true"
loadBalancerSourceRanges: []
# 0.0.0.0/0
httpPortName: http

ingress:
enabled: false
Expand Down

0 comments on commit 4ad3e8a

Please sign in to comment.