apache / apache/apisix-helm-chart

Bug: gateway.annotations did not find expected key

Open
#495 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go Template
Stars
289
Forks
282
Avg merge
15h 55m
Merged PRs (30d)
3

Description

1、尝试修改annotations内容的时候发生报错
```
templates/service-gateway.yaml

annotations:
{{- range $key, $value := .Values.gateway.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}

```
Error: UPGRADE FAILED: YAML parse error on apisix/templates/service-gateway.yaml: error converting YAML to JSON: yaml: line 24: did not find expected key
2、将 templates/service-gateway.yaml 改为如下内容问题修复;
```
annotations:
{{- with .Values.gateway.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with templates/service-gateway.yaml and the gateway.annotations values used by the chart. Render the chart with those annotations using Helm and inspect the generated YAML around the Service metadata. Done means the chart renders without a YAML parse error and the configured annotations appear correctly.

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
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.