Graylog2 / Graylog2/graylog-helm

Invalid nodeSelector

Open
#97 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go Template
Stars
12
Forks
3
Avg merge
2d 4h
Merged PRs (30d)
13

Description

## Summary
The node selector rendering for the graylog and datanode StatefulSets are broken

### Details
Values provided for the nodeSelector render as a map, not as yaml

### Impact
A kustomize patch is needed for node selector, or `affinity` needs to be used instead

## How to Reproduce?

Given a test values file of:

```yaml
graylog:
nodeSelector:
my-key: my-value
datanode:
nodeSelector:
other-key: other-value
```

Then:

```
helm template graylog graylog/graylog --version 1.0.0 -f test.values.yml | yq 'select(.kind == "StatefulSet" and .metadata.name == "graylog")' | grep -B2 -A5 'nodeSelector'
spec:
dnsPolicy: ClusterFirst
nodeSelector: map[my-key:my-value]
serviceAccountName: graylog-sa
securityContext:
runAsUser: 1100
runAsGroup: 1100
fsGroup: 1100
helm template graylog graylog/graylog --version 1.0.0 -f test.values.yml | yq 'select(.kind == "StatefulSet" and .metadata.name == "graylog-datanode")' | grep -B2 -A5 'nodeSelector'
spec:
dnsPolicy: ClusterFirst
nodeSelector: map[other-key:other-value]
serviceAccountName: graylog-sa
containers:
- name: graylog-datanode
image: graylog/graylog-datanode:7.0
imagePullPolicy: IfNotPresent
```

## Environment

- Helm chart version: 1.0.0
- Graylog version:
- Kubernetes version:
- Cloud provider / platform:

### Pre-flight checks
- [x] `helm lint ./graylog` passes
- [x] Checked existing issues for duplicates

### Steps to reproduce the issue:
1. See "how to reproduce"

**Expected behavior**
Yaml rendering with something like:

```
nodeSelector:
{{- toYaml .Values.graylog.nodeSelector | nindent 8 }}
```

Instead of
```
nodeSelector: {{ .Values.graylog.nodeSelector }}
```

## Notes for maintainers
_Any additional context, logs, or screenshots_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.