refactor(ingress): extract annotation, label and name rendering into helpers
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>
This commit is contained in:
+4
-2
@@ -588,17 +588,19 @@ gatewayAPI:
|
||||
|
||||
## @section Ingress
|
||||
## @param ingress.enabled Enable ingress
|
||||
## @param ingress.annotations Additional annotations.
|
||||
## @param ingress.labels Additional labels.
|
||||
## @param ingress.className DEPRECATED: Ingress class name.
|
||||
## @param ingress.pathType Ingress Path Type
|
||||
## @param ingress.annotations Ingress annotations
|
||||
## @param ingress.hosts[0].host Default Ingress host
|
||||
## @param ingress.hosts[0].paths[0].path Default Ingress path
|
||||
## @param ingress.tls Ingress tls settings
|
||||
ingress:
|
||||
enabled: false
|
||||
annotations: {}
|
||||
labels: {}
|
||||
className: ""
|
||||
pathType: Prefix
|
||||
annotations: {}
|
||||
hosts:
|
||||
- host: git.example.com
|
||||
paths:
|
||||
|
||||
Reference in New Issue
Block a user