Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add loadbalancerIP as a helm parameter #2766

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/nginx-gateway-fabric/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
| `service.annotations` | The annotations of the NGINX Gateway Fabric service. | object | `{}` |
| `service.create` | Creates a service to expose the NGINX Gateway Fabric pods. | bool | `true` |
| `service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | string | `"Local"` |
| `service.loadBalancerIP` | The static IP address for the load balancer. Requires service.type set to LoadBalancer. | string | `""` |
| `service.ports` | A list of ports to expose through the NGINX Gateway Fabric service. Update it to match the listener ports from your Gateway resource. Follows the conventional Kubernetes yaml syntax for service ports. | list | `[{"name":"http","port":80,"protocol":"TCP","targetPort":80},{"name":"https","port":443,"protocol":"TCP","targetPort":443}]` |
| `service.type` | The type of service to create for the NGINX Gateway Fabric. | string | `"LoadBalancer"` |
| `serviceAccount.annotations` | Set of custom annotations for the NGINX Gateway Fabric service account. | object | `{}` |
Expand Down
3 changes: 3 additions & 0 deletions charts/nginx-gateway-fabric/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ spec:
{{- end }}
{{- end }}
type: {{ .Values.service.type }}
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end}}
selector:
{{- include "nginx-gateway.selectorLabels" . | nindent 4 }}
ports: # Update the following ports to match your Gateway Listener ports
Expand Down
7 changes: 7 additions & 0 deletions charts/nginx-gateway-fabric/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,13 @@
"required": [],
"title": "externalTrafficPolicy"
},
"loadBalancerIP": {
"default": "",
"description": "The static IP address for the load balancer. Requires service.type set to LoadBalancer.",
"required": [],
"title": "loadBalancerIP",
"type": "string"
},
"ports": {
"description": "A list of ports to expose through the NGINX Gateway Fabric service. Update it to match the listener ports from\nyour Gateway resource. Follows the conventional Kubernetes yaml syntax for service ports.",
"items": {
Expand Down
3 changes: 3 additions & 0 deletions charts/nginx-gateway-fabric/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ service:
# -- The annotations of the NGINX Gateway Fabric service.
annotations: {}

# -- The static IP address for the load balancer. Requires service.type set to LoadBalancer.
loadBalancerIP: ""

# @schema
# type: array
# items:
Expand Down
Loading