Skip to content

Commit

Permalink
Add option for node service port start
Browse files Browse the repository at this point in the history
  • Loading branch information
dfangl committed Jun 11, 2024
1 parent f517c9c commit 876e09c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 7 additions & 4 deletions charts/localstack/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ spec:
containerPort: 53
protocol: UDP
{{- end }}
{{- range untilStep (.Values.service.externalServicePorts.start|int) (.Values.service.externalServicePorts.end|int) 1 }}
- name: "external-service-port-{{ . }}"
port: {{ . }}
targetPort: "ext-svc-{{ . }}"
{{- range $index, $port := untilStep (.Values.service.externalServicePorts.start|int) (.Values.service.externalServicePorts.end|int) 1 }}
- name: "external-service-port-{{ $port }}"
port: {{ $port }}
targetPort: "ext-svc-{{ $port }}"
{{- with $.Values.service.externalServicePorts.nodePortStart|int }}
nodePort: {{ add $index . }}
{{- end }}
{{- end }}
selector:
{{- include "localstack.selectorLabels" . | nindent 4 }}
3 changes: 3 additions & 0 deletions charts/localstack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ service:
externalServicePorts:
start: 4510
end: 4560
## @param service.externalServicePorts.nodeStart specifies the starting node ports the serviceports are mapped to
## has to be in the node port range configured. See https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
# nodePortStart: 31510
## @param service.dnsService Enables or disables the exposure of the LocalStack DNS
##
dnsService: false
Expand Down

0 comments on commit 876e09c

Please sign in to comment.