Skip to content

Commit

Permalink
allow customization of service http and https port names through helm…
Browse files Browse the repository at this point in the history
… chart

This change allows users to customize the names of the NIC service's http and https ports through a helm chart. It adds defaults which are the same as the previous hardcoded values in the helm chart, thereby ensuring backwards compatibility.

This change will enable users of NIC to more smoothly integrate with NGINXaaS's AKS functionality. Our load balancer for kubernetes discovers the upstream name and upstream type that it needs to update by parsing service port names, so we need to allow users of our service to easily customize port names.
  • Loading branch information
arussellf5 committed Feb 10, 2025
1 parent 1bf57cd commit 2a8b018
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/nginx-ingress/templates/controller-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
- port: {{ .Values.controller.service.httpPort.port }}
targetPort: {{ .Values.controller.service.httpPort.targetPort }}
protocol: TCP
name: http
name: {{ .Values.controller.service.httpPort.name }}
{{- if or (eq .Values.controller.service.type "LoadBalancer") (eq .Values.controller.service.type "NodePort") }}
nodePort: {{ .Values.controller.service.httpPort.nodePort }}
{{- end }}
Expand All @@ -58,7 +58,7 @@ spec:
- port: {{ .Values.controller.service.httpsPort.port }}
targetPort: {{ .Values.controller.service.httpsPort.targetPort }}
protocol: TCP
name: https
name: {{ .Values.controller.service.httpsPort.name }}
{{- if or (eq .Values.controller.service.type "LoadBalancer") (eq .Values.controller.service.type "NodePort") }}
nodePort: {{ .Values.controller.service.httpsPort.nodePort }}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions charts/nginx-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ controller:
## The HTTP port on the POD where the Ingress Controller service is running.
targetPort: 80

## The name of the HTTP port.
name: "http"

httpsPort:
## Enables the HTTPS port for the Ingress Controller service.
enable: true
Expand All @@ -491,6 +494,9 @@ controller:
## The HTTPS port on the POD where the Ingress Controller service is running.
targetPort: 443

## The name of the HTTPS port.
name: "https"

## A list of custom ports to expose through the Ingress Controller service. Follows the conventional Kubernetes yaml syntax for service ports.
customPorts: []

Expand Down

0 comments on commit 2a8b018

Please # to comment.