Skip to content

Commit 9dc3170

Browse files
committed
add loadBalancerSourceRanges to helm parameters
1 parent e7d217a commit 9dc3170

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

charts/nginx-gateway-fabric/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ The following table lists the configurable parameters of the NGINX Gateway Fabri
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"` |
302302
| `service.loadBalancerIP` | The static IP address for the load balancer. Requires service.type set to LoadBalancer. | string | `""` |
303+
| `service.loadBalancerSourceRanges` | The IP ranges (CIDR) that are allowed to access the load balancer. Requires service.type set to LoadBalancer. | list | `[]` |
303304
| `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}]` |
304305
| `service.type` | The type of service to create for the NGINX Gateway Fabric. | string | `"LoadBalancer"` |
305306
| `serviceAccount.annotations` | Set of custom annotations for the NGINX Gateway Fabric service account. | object | `{}` |

charts/nginx-gateway-fabric/templates/service.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@ spec:
1717
{{- end }}
1818
{{- end }}
1919
type: {{ .Values.service.type }}
20-
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }}
20+
{{- if eq .Values.service.type "LoadBalancer" }}
21+
{{- if .Values.service.loadBalancerIP }}
2122
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
23+
{{- end }}
24+
{{- if .Values.service.loadBalancerSourceRanges }}
25+
loadBalancerSourceRanges:
26+
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
27+
{{- end }}
2228
{{- end}}
2329
selector:
2430
{{- include "nginx-gateway.selectorLabels" . | nindent 4 }}

charts/nginx-gateway-fabric/values.schema.json

+9
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,15 @@
580580
"title": "loadBalancerIP",
581581
"type": "string"
582582
},
583+
"loadBalancerSourceRanges": {
584+
"description": "The IP ranges (CIDR) that are allowed to access the load balancer. Requires service.type set to LoadBalancer.",
585+
"items": {
586+
"required": []
587+
},
588+
"required": [],
589+
"title": "loadBalancerSourceRanges",
590+
"type": "array"
591+
},
583592
"ports": {
584593
"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.",
585594
"items": {

charts/nginx-gateway-fabric/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ service:
306306
# -- The static IP address for the load balancer. Requires service.type set to LoadBalancer.
307307
loadBalancerIP: ""
308308

309+
# -- The IP ranges (CIDR) that are allowed to access the load balancer. Requires service.type set to LoadBalancer.
310+
loadBalancerSourceRanges: []
311+
309312
# @schema
310313
# type: array
311314
# items:

0 commit comments

Comments
 (0)