Skip to content

feat: implement service type NodePort#2986

Open
lucasl0st wants to merge 2 commits intozalando:masterfrom
lucasl0st:service-type-node-port
Open

feat: implement service type NodePort#2986
lucasl0st wants to merge 2 commits intozalando:masterfrom
lucasl0st:service-type-node-port

Conversation

@lucasl0st
Copy link
Copy Markdown

@lucasl0st lucasl0st commented Nov 14, 2025

This PR adds support for Kubernetes services of type NodePort.
I tried my best to keep the structure of the configuration and code the same as for the LoadBalancer service type.

If the configuration for the NodePort is enabled the LoadBalancer configuration is overwritten.
Specific ports to be used on the kubernetes node(s) can be specified, if left empty kubernetes picks a port based on the clusters configuration: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport

Implements #983
Probably supersedes #994

Since this is my first PR at Zalando and this repository, please feel free to let me know if you would like me to make changes, if you want a specific test or if I need to bump a version somewhere. Thank you!

@zalando-robot
Copy link
Copy Markdown

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

@lucasl0st lucasl0st force-pushed the service-type-node-port branch from eeefb5c to 2aacee5 Compare November 14, 2025 17:07
@zalando-robot
Copy link
Copy Markdown

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

@lucasl0st lucasl0st force-pushed the service-type-node-port branch from 2aacee5 to 268047e Compare November 15, 2025 14:16
@zalando-robot
Copy link
Copy Markdown

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

@lucasl0st lucasl0st force-pushed the service-type-node-port branch from 268047e to 2552ad0 Compare November 15, 2025 14:30
@zalando-robot
Copy link
Copy Markdown

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

@lucasl0st lucasl0st marked this pull request as ready for review November 15, 2025 14:38
@FxKu FxKu added the minor label Dec 6, 2025
@FxKu FxKu requested a review from mikkeloscar as a code owner December 6, 2025 16:37
@FxKu FxKu moved this to Waiting for review in Postgres Operator Dec 16, 2025
@FxKu FxKu added this to the 2.0.0 milestone Dec 16, 2025
@lucasl0st lucasl0st force-pushed the service-type-node-port branch from 8a1d100 to c6d5948 Compare January 8, 2026 18:42
@zalando-robot
Copy link
Copy Markdown

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

@lucasl0st lucasl0st force-pushed the service-type-node-port branch from c6d5948 to 3614a45 Compare February 16, 2026 10:10
@zalando-robot
Copy link
Copy Markdown

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

@FxKu
Copy link
Copy Markdown
Member

FxKu commented Apr 23, 2026

@lucasl0st sorry for the delay reviewing you nice contribution. This looks like the best attempt so far to get NodePort service type support in our operator. I've checked most changes briefly so far and it looks sound.

On general implementation detail we need to think about is what takes precedence when both NodePort and LoadBalancer service type are enabled from the manifest or config? I think this should create an LB, maybe with a hard-coded port if NodePort is specified in the manifest. In the pooler code, for example, I saw that you added NodePort configuration after the LB.

@FxKu FxKu moved this from Waiting for review to WIP / currently reviewed in Postgres Operator Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: WIP / currently reviewed

Development

Successfully merging this pull request may close these issues.

3 participants