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

Commit

Permalink
[logstash] use only httpPort in headless service (#839)
Browse files Browse the repository at this point in the history
This commit fix an issue introduced in 8ed75a9 where helm
install/upgrade is failing if a NodePort service is defined (see [0] for
more details).

Logstash headless service used to manage Statefulset does not anymore include
`.Values.service.ports` and include only Logstash httpPort.

This is done because headless service `ports` doesn't accept `nodePort`
values that can be included in `.Values.service.ports` when adding a
NodePort service.

[0]: #807
  • Loading branch information
jmlrt committed Oct 16, 2020
1 parent 39481b5 commit 87d6cce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
4 changes: 0 additions & 4 deletions logstash/templates/service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@ spec:
selector:
app: "{{ template "logstash.fullname" . }}"
ports:
{{- if .Values.service }}
{{ toYaml .Values.service.ports | indent 4 }}
{{- else }}
- name: http
port: {{ .Values.httpPort }}
{{- end }}
7 changes: 0 additions & 7 deletions logstash/tests/logstash_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,13 +860,6 @@ 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 87d6cce

Please sign in to comment.