Skip to content

Commit ccb016f

Browse files
jkroepkek8s-infra-cherrypick-robot
authored andcommitted
pass service annotations through helm tpl engine
Signed-off-by: Jan-Otto Kröpke <[email protected]>
1 parent 443dfbe commit ccb016f

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

charts/ingress-nginx/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,14 @@ As of version `1.26.0` of this chart, by simply not providing any clusterIP valu
399399
| controller.scope.enabled | bool | `false` | Enable 'scope' or not |
400400
| controller.scope.namespace | string | `""` | Namespace to limit the controller to; defaults to $(POD_NAMESPACE) |
401401
| controller.scope.namespaceSelector | string | `""` | When scope.enabled == false, instead of watching all namespaces, we watching namespaces whose labels only match with namespaceSelector. Format like foo=bar. Defaults to empty, means watching all namespaces. |
402-
| controller.service.annotations | object | `{}` | |
402+
| controller.service.annotations | object | `{}` | Annotations are mandatory for the load balancer to come up. Varies with the cloud service. Values passed through helm tpl engine. |
403403
| controller.service.appProtocol | bool | `true` | If enabled is adding an appProtocol option for Kubernetes service. An appProtocol field replacing annotations that were using for setting a backend protocol. Here is an example for AWS: service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http It allows choosing the protocol for each backend specified in the Kubernetes service. See the following GitHub issue for more details about the purpose: https://github.com/kubernetes/kubernetes/issues/40244 Will be ignored for Kubernetes versions older than 1.20 # |
404404
| controller.service.enableHttp | bool | `true` | |
405405
| controller.service.enableHttps | bool | `true` | |
406406
| controller.service.enabled | bool | `true` | |
407407
| controller.service.external.enabled | bool | `true` | |
408408
| controller.service.externalIPs | list | `[]` | List of IP addresses at which the controller services are available # Ref: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips # |
409-
| controller.service.internal.annotations | object | `{}` | Annotations are mandatory for the load balancer to come up. Varies with the cloud service. |
409+
| controller.service.internal.annotations | object | `{}` | Annotations are mandatory for the load balancer to come up. Varies with the cloud service. Values passed through helm tpl engine. |
410410
| controller.service.internal.enabled | bool | `false` | Enables an additional internal load balancer (besides the external one). |
411411
| controller.service.internal.loadBalancerIP | string | `""` | Used by cloud providers to connect the resulting internal LoadBalancer to a pre-existing static IP. Make sure to add to the service the needed annotation to specify the subnet which the static IP belongs to. For instance, `networking.gke.io/internal-load-balancer-subnet` for GCP and `service.beta.kubernetes.io/aws-load-balancer-subnets` for AWS. |
412412
| controller.service.internal.loadBalancerSourceRanges | list | `[]` | Restrict access For LoadBalancer service. Defaults to 0.0.0.0/0. |

charts/ingress-nginx/templates/controller-service-internal.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: Service
44
metadata:
55
annotations:
66
{{- range $key, $value := .Values.controller.service.internal.annotations }}
7-
{{ $key }}: {{ $value | quote }}
7+
{{ $key }}: {{ tpl ($value | toString) $ | quote }}
88
{{- end }}
99
labels:
1010
{{- include "ingress-nginx.labels" . | nindent 4 }}

charts/ingress-nginx/templates/controller-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: Service
44
metadata:
55
annotations:
66
{{- range $key, $value := .Values.controller.service.annotations }}
7-
{{ $key }}: {{ $value | quote }}
7+
{{ $key }}: {{ tpl ($value | toString) $ | quote }}
88
{{- end }}
99
labels:
1010
{{- include "ingress-nginx.labels" . | nindent 4 }}

charts/ingress-nginx/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ controller:
415415
# Will be ignored for Kubernetes versions older than 1.20
416416
##
417417
appProtocol: true
418+
# -- Annotations are mandatory for the load balancer to come up. Varies with the cloud service. Values passed through helm tpl engine.
418419
annotations: {}
419420
labels: {}
420421
# clusterIP: ""
@@ -476,7 +477,7 @@ controller:
476477
internal:
477478
# -- Enables an additional internal load balancer (besides the external one).
478479
enabled: false
479-
# -- Annotations are mandatory for the load balancer to come up. Varies with the cloud service.
480+
# -- Annotations are mandatory for the load balancer to come up. Varies with the cloud service. Values passed through helm tpl engine.
480481
annotations: {}
481482
# -- Used by cloud providers to connect the resulting internal LoadBalancer to a pre-existing static IP. Make sure to add to the service the needed annotation to specify the subnet which the static IP belongs to. For instance, `networking.gke.io/internal-load-balancer-subnet` for GCP and `service.beta.kubernetes.io/aws-load-balancer-subnets` for AWS.
482483
loadBalancerIP: ""

0 commit comments

Comments
 (0)