The Ingress was the last chart-managed resource that built its metadata inline. Annotations were rendered with a `range` over the values map, which indents each entry manually and cannot be reused, and the resource had no way to attach additional labels. Annotations, labels and the name are now rendered by helpers in `_ingresses.tpl`, matching the pattern already used by the other resources. This also adds `ingress.labels` so extra labels can be attached to the Ingress, and reorders the `ingress` keys in `values.yaml` to the convention of `enabled`, `annotations` and `labels` first. The `$httpPort` variable was assigned before the `range` over `ingress.hosts` and therefore resolved against the wrong context once the loop rebound the dot. It has been replaced by `$.Values.service.http.port`, which reads the value from the root context at the point of use. Co-authored-by: Copilot <copilot@github.com>
24 lines
440 B
Smarty
24 lines
440 B
Smarty
{{/* vim: set filetype=mustache: */}}
|
|
|
|
{{/* annotations */}}
|
|
|
|
{{- define "gitea.ingress.annotations" -}}
|
|
{{- with .Values.ingress.annotations }}
|
|
{{- toYaml . -}}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{/* labels */}}
|
|
|
|
{{- define "gitea.ingress.labels" -}}
|
|
{{ include "gitea.labels" . }}
|
|
{{- with .Values.ingress.labels }}
|
|
{{ toYaml . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{/* name */}}
|
|
|
|
{{- define "gitea.ingress.name" -}}
|
|
{{ include "gitea.fullname" . }}
|
|
{{- end }} |