Skip to content

Commit 2dac480

Browse files
committed
add loadbalancerIP as helm parameter
1 parent 82a8a23 commit 2dac480

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

Diff for: charts/nginx-gateway-fabric/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
299299
| `service.annotations` | The annotations of the NGINX Gateway Fabric service. | object | `{}` |
300300
| `service.create` | Creates a service to expose the NGINX Gateway Fabric pods. | bool | `true` |
301301
| `service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | string | `"Local"` |
302+
| `service.loadBalancerIP` | The static IP address for the load balancer. Requires service.type set to LoadBalancer. | string | `""` |
302303
| `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}]` |
303304
| `service.type` | The type of service to create for the NGINX Gateway Fabric. | string | `"LoadBalancer"` |
304305
| `serviceAccount.annotations` | Set of custom annotations for the NGINX Gateway Fabric service account. | object | `{}` |

Diff for: charts/nginx-gateway-fabric/templates/service.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ spec:
1717
{{- end }}
1818
{{- end }}
1919
type: {{ .Values.service.type }}
20+
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }}
21+
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
22+
{{- end}}
2023
selector:
2124
{{- include "nginx-gateway.selectorLabels" . | nindent 4 }}
2225
ports: # Update the following ports to match your Gateway Listener ports

Diff for: charts/nginx-gateway-fabric/values.schema.json

+7
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,13 @@
573573
"required": [],
574574
"title": "externalTrafficPolicy"
575575
},
576+
"loadBalancerIP": {
577+
"default": "",
578+
"description": "The static IP address for the load balancer. Requires service.type set to LoadBalancer.",
579+
"required": [],
580+
"title": "loadBalancerIP",
581+
"type": "string"
582+
},
576583
"ports": {
577584
"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.",
578585
"items": {

Diff for: charts/nginx-gateway-fabric/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ service:
303303
# -- The annotations of the NGINX Gateway Fabric service.
304304
annotations: {}
305305

306+
# -- The static IP address for the load balancer. Requires service.type set to LoadBalancer.
307+
loadBalancerIP: ""
308+
306309
# @schema
307310
# type: array
308311
# items:

0 commit comments

Comments
 (0)