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
Closed
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
38 changes: 38 additions & 0 deletions logstash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,44 @@ There are a couple reasons we recommend this.
1. Tying the availability of Logstash to the download service to install plugins is not a great idea or something that we recommend. Especially in Kubernetes where it is normal and expected for a container to be moved to another host at random times.
2. Mutating the state of a running docker image (by installing plugins) goes against best practices of containers and immutable infrastructure.

#### Why am I missing required field `serviceName` during install?

When executing `helm install`, you may receive an error similar to the following:

```bash
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
```

By default, no services are defined in the `values.yaml` file. This is due to the fact that there are many plugins and many possible use cases for Logstash.

In order to successfully install logstash, at least one service must be defined. This can be done by finding the following section in `values.yaml`:

```yaml
service: {}
# annotations: {}
# type: ClusterIP
# ports:
# - name: beats
# port: 5044
# protocol: TCP
# targetPort: 5044
# - name: http
# port: 8080
# protocol: TCP
# targetPort: 8080
```

Once you have found this, do the following:

1. Remove `{}` from `service:`.
2. Uncomment the following lines:
```yaml
# annotations: {}
# type: ClusterIP
# ports:
```
3. Uncomment one of the existing service definitions or define a new service.

## Testing

This chart uses [pytest](https://docs.pytest.org/en/latest/) to test the templating logic. The dependencies for testing can be installed from the [`requirements.txt`](../requirements.txt) in the parent directory.
Expand Down