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

[logstash] Add FAQ: Why am I missing required field serviceName during install? #398

Closed
wants to merge 1 commit into from

Conversation

drenze
Copy link

@drenze drenze commented Dec 6, 2019

User may receive the following error when executing helm install ...:

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(StatefulSet.spec): missing required field "serviceName" in io.k8s.api.apps.v1.StatefulSetSpec

This is due to the requirement to define at least one service in
values.yaml prior to an install. Added FAQ to README.md to address
this question.

  • Chart version not bumped (the versions are all bumped and released at the same time)
  • README.md updated with any new values or changes
  • Updated template tests in ${CHART}/tests/*.py
  • Updated integration tests in ${CHART}/examples/*/test/goss.yaml

User may receive the following error when executing `helm install ...`:

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(StatefulSet.spec): missing required field "serviceName" in io.k8s.api.apps.v1.StatefulSetSpec

This is due to the requirement to define at least one service in
`values.yaml` prior to an install. Added FAQ to README.md to address
this question.
@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@cla-checker-service
Copy link

Author of the following commits did not sign a Contributor Agreement:
9ec17b8

Please, read and sign the above mentioned agreement if you want to contribute to this project

@drenze drenze changed the title Add FAQ: Why am I missing required field serviceName during install? [logstash] Add FAQ: Why am I missing required field serviceName during install? Dec 6, 2019
@jmlrt
Copy link
Member

jmlrt commented Dec 6, 2019

Hi @drenze,
Thank you for your PR, however service are optional and used only if you need to define a Logstash listener to receive external calls like the Beats input plugin which will receive logs from Beats on port 5044 for exemple.

If you don't need a service, you should let the default config with service: {}. This configuration is automatically tested everyday without any issue.

In order to help you with your issue, can you paste here your values file and the exact command you are typing?

@drenze
Copy link
Author

drenze commented Dec 6, 2019 via email

@jmlrt
Copy link
Member

jmlrt commented Dec 6, 2019

We have a python unit test which specifically ensure than no service will be required with default configuration. This test is run every day on our CI.

In addition we have another daily CI job which is deploying helm chart with default values (by cloning repo then installing the chart) on a GKE cluster and run smoke tests to ensure that the chart installation is OK and Logstash is working well.

Both this tests are running without error.

Can you provide the exact commands you are typing and some details on your k8s environment:

  • K8S provider (GKE, AKS, EKS, OpenShift, bare metal, minikube, ...)
  • K8S version
  • Helm version

@krichter722
Copy link
Contributor

krichter722 commented Dec 8, 2019

This seems to happen with helm 3.x (3.0.1 in my case) only. @jmlrt A link to the issue or roadmap for support of helm 3.x would be welcome.

@drenze After you got an insight into the helm 3.x support roadmap and your change is deemed valuable by the devs, I suggest to shorten the explanation of edits to the template as it's irrelevant which comment to remove exactly. If you state "put a value x in the service section of values.yml" it's sufficiently profound.

@jmlrt
Copy link
Member

jmlrt commented Dec 8, 2019

OK, we don't support Helm v3 yet as mentionned in elastic/helm-charts#helm-versions. Despite we will support it at some time, we don't have any roadmap for it currently.

@krichter722
Copy link
Contributor

The workaround proposed in this PR seems to work. I opened #401 not to push it, but it has to be done one day and it's a simple first step.

@krichter722 krichter722 mentioned this pull request Dec 8, 2019
@jmlrt
Copy link
Member

jmlrt commented Dec 11, 2019

I'm closing this PR as it is explicitely mentionned than Helm v3 is not supported, and we now have an issue to support it.

@jmlrt jmlrt closed this Dec 11, 2019
@poochwashere
Copy link

I am getting this same error with helm 2.14

❯ helm --tls --tiller-namespace=tiller --namespace=elk install --name logstash elastic/logstash --values values.yaml
Error: validation failed: error validating "": error validating data: ValidationError(StatefulSet.spec): missing required field "serviceName" in io.k8s.api.apps.v1.StatefulSetSpec

@jmlrt
Copy link
Member

jmlrt commented Dec 13, 2019

@poochwashere can you provide your values.yaml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants