Quote values for ingress annotations as discussed in #483 (#497)

Quote all values for Ingress annotations as discussed in https://gitea.com/gitea/helm-chart/issues/483
Annotations are currently not quoted, and can not be set to non-string values using the _--set_ with _helm_ (see examples in issue).

Annotations for ingress-nginx MUST be quoted: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md#annotations

```
!!! tip Annotation keys and values can only be strings. Other types, such as boolean or numeric values must be quoted, i.e. "true", "false", "100".
```

Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/497
Reviewed-by: pat-s <pat-s@noreply.gitea.com>
Co-authored-by: tobiasbp <tobiasbp@noreply.gitea.com>
Co-committed-by: tobiasbp <tobiasbp@noreply.gitea.com>
This commit is contained in:
tobiasbp 2023-08-31 17:07:45 +00:00 committed by pat-s
parent 3276f1e76d
commit 1550f9b4e0

View File

@ -15,10 +15,10 @@ metadata:
name: {{ $fullName }}
labels:
{{- include "gitea.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}