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

Commit

Permalink
[logstash] Fix headless service ports spec (#776)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Mailleret <[email protected]>
  • Loading branch information
itssimon and jmlrt authored Aug 27, 2020
1 parent fb65759 commit 8ed75a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
9 changes: 5 additions & 4 deletions logstash/templates/service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ spec:
selector:
app: "{{ template "logstash.fullname" . }}"
ports:
- name: http
port: {{ .Values.httpPort }}
{{- if .Values.extraPorts }}
{{- toYaml .Values.extraPorts | nindent 2 }}
{{- if .Values.service }}
{{ toYaml .Values.service.ports | indent 4 }}
{{- else }}
- name: http
port: {{ .Values.httpPort }}
{{- end }}
7 changes: 7 additions & 0 deletions logstash/tests/logstash_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,13 @@ def test_adding_a_service():
"protocol": "TCP",
"targetPort": 5044,
}
h = r["service"][name + "-headless"]
assert h["spec"]["ports"][0] == {
"name": "beats",
"port": 5044,
"protocol": "TCP",
"targetPort": 5044,
}


def test_setting_fullnameOverride():
Expand Down

0 comments on commit 8ed75a9

Please sign in to comment.