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

[logstash] Fix headless service ports spec #776

Merged
merged 4 commits into from
Aug 27, 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
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