diff --git a/charts/rqlite/templates/_service.tpl b/charts/rqlite/templates/_service.tpl index 6343b97..39a48c2 100644 --- a/charts/rqlite/templates/_service.tpl +++ b/charts/rqlite/templates/_service.tpl @@ -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 }} diff --git a/charts/rqlite/values.yaml b/charts/rqlite/values.yaml index 67b3e37..ecf666a 100644 --- a/charts/rqlite/values.yaml +++ b/charts/rqlite/values.yaml @@ -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