apache / apache/devlake-helm-chart

invalid document separator: ---apiVersion: networking.k8s.io/v1

Open Beginner friendly
#366 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go Template
Stars
52
Forks
72
Avg merge
21h 4m
Merged PRs (30d)
1

Description

Hi!

I am using the Helm Chart on version devlake@1.0.3-beta9 with the values.yaml as seen below:

```yaml
grafana:
grafana.ini:
server:
root_url: "https://devlake.example.com/grafana"
lake:
encryptionSecret:
secretName: devlake
autoCreateSecret: false
ingress:
enabled: true
enableHttps: true
useDefaultNginx: false
className: devlake-nginx
hostname: devlake.example.com
annotations:
cert-manager.io/cluster-issuer: google-ca
tlsSecretName: "devlake-tls-cert"
```

When rendering the chart and I get following error message:

`error merging manifests: parsing devlake/templates/ingresses.yaml: invalid document separator: ---apiVersion: networking.k8s.io/v1`

After looking at the Helm Chart templates, in the `ingresses.yaml` file, this section seems to be the culprit:

```yaml
---
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
```

The usage of `{{-` and `-}}` seems to cause the whitespace (which includes newlines) to be remove and the resulting apiVersion gets generated right on the side of the `---`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with devlake/templates/ingresses.yaml and inspect the Helm whitespace-trimming markers around the document separator and Kubernetes apiVersion condition. Render the chart using the reported values and Kubernetes version, then verify that the generated manifest has a valid separator before apiVersion and that the rendering error is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.