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

[logstash] Unable to install Logstash with configured nodePort #807

Closed
Gagarmel opened this issue Sep 8, 2020 · 1 comment · Fixed by #839
Closed

[logstash] Unable to install Logstash with configured nodePort #807

Gagarmel opened this issue Sep 8, 2020 · 1 comment · Fixed by #839
Labels
bug Something isn't working logstash

Comments

@Gagarmel
Copy link

Gagarmel commented Sep 8, 2020

Chart version:
7.9.1

Kubernetes version:
v1.15.12

Kubernetes provider: E.g. GKE (Google Kubernetes Engine)
Own

Helm Version:
3.3.0

Provided values.yaml

service:
  type: NodePort
  ports:
    - name: beats
      port: 5044
      protocol: TCP
      nodePort: 31545

Describe the bug:
Due to changes made in #776 it is not possible to install a Logstash instance which has a configured nodePort.

Steps to reproduce:

  1. Use the above mentioned values.yaml
  2. Install Logstash helm install logstash elastic/logstash -f values.yaml

Expected behavior:
It should be possible to create a Logstash installation with Service type=NodePort and configured nodePort=xxxxx. This was possible in previous versions of this chart.

Provide logs and/or server output (if relevant):

Be careful to obfuscate every secrets (credentials, token, public IP, ...) that could be visible in the output before copy-pasting

Error: Service "logstash-logstash-headless" is invalid: spec.ports[0].nodePort: Forbidden: may not be used when `type` is 'ClusterIP'

Any additional context:

@jmlrt
Copy link
Member

jmlrt commented Sep 16, 2020

Hi @Gagarmel,
Thanks for reporting this bug 👍

Good catch, I didn't test it with NodePort when I reviewed #776 😞.

IMO we should be able to remove totally .Values.service.ports and use only the beat port for the headless service as the headless service should only be used for K8S statefulset management and a real service should be created for other usages.

{{- if .Values.service }}
{{ toYaml .Values.service.ports | indent 4 }}
{{- else }}

@jmlrt jmlrt added bug Something isn't working logstash labels Sep 16, 2020
jmlrt added a commit to jmlrt/helm-charts that referenced this issue Oct 14, 2020
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]: elastic#807
jmlrt added a commit to jmlrt/helm-charts that referenced this issue Oct 14, 2020
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]: elastic#807
jmlrt added a commit that referenced this issue Oct 14, 2020
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
jmlrt added a commit that referenced this issue Oct 16, 2020
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
jmlrt added a commit that referenced this issue Oct 16, 2020
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
jmlrt added a commit that referenced this issue Oct 16, 2020
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
galina-tochilkin pushed a commit to mtp-devops/3d-party-helm that referenced this issue Dec 20, 2022
This commit fix an issue introduced in 88ea6b7 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]: elastic/helm-charts#807
galina-tochilkin pushed a commit to mtp-devops/3d-party-helm that referenced this issue Dec 20, 2022
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]: elastic/helm-charts#807
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working logstash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants