Skip to content

Commit

Permalink
Add support for explicit nodePort
Browse files Browse the repository at this point in the history
  • Loading branch information
jtackaberry committed Jan 2, 2024
1 parent c03a8dd commit 598e1ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion charts/rqlite/templates/_service.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ spec:
port: {{ $clientPort }}
targetPort: http
{{- if ne $serviceType "ClusterIP" }}
{{- with dig "service" "nodePort" $.Values.service.nodePort $values }}
{{- /* This is an exception to the "inherits from voter configuration" rule: node ports must be unique. */}}
{{- with dig "service" "nodePort" 0 $values }}
nodePort: {{ . }}
{{- end }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions charts/rqlite/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ service:
ipFamilies: []
# Leave null to automatically generate a ClusterIP
clusterIP: null
# If type is NodePort or LoadBalancer, this may be defined to set an explicit node port.
# Note that this particular field is not inherited by the read-pool (if enabled) because
# uniqueness is required.
nodePort: null
# Service port defaults to port 80 when config.tls.http.enabled is false, or 443
# otherwise. But you can override the default choice here.
port: null
Expand Down

0 comments on commit 598e1ab

Please sign in to comment.