-
Notifications
You must be signed in to change notification settings - Fork 642
Description
Overview
I would like to be able to define the port value for any NodePort service statically. In the case where we integrate with an external service (such as a hardware load balancer) that sends traffic to the services running in a Kube cluster, if we have to rebuild the postgrescluster from scratch, or recreate the service, it assigns a new NodePort, requiring either patching of the service or reconfiguration of the integrating external service.
Use Case
We run two postgresclusters in different Kubernetes cluster in different datacenters, to serve a database to a single service that also runs in both in an HA manner. We pipe traffic to the current active cluster by way of a hardware load balancer, which talks to the clusters via the pgbouncer node port service. If we have to rebuild the clusters, the service gets created fresh with a different NodePort. Right now we are patching it post deployment, but being able to statically set this NodePort value would eliminate the need for this step.
Desired Behavior
When I define that a service should be of type NodePort, I should also be able to statically set the value I want to use for said NodePort.
Environment
- Platform:
Kubernetes - Platform Version:
1.18.18 - PGO Image Tag:
ubi8-5.0.4-0 - Postgres Version
13 - Storage:
s3 - Number of Postgres clusters:
2