You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When exposing a Service of type LoadBalancer, it can be useful to set the .spec.loadBalancerClass field in case there are multiple implementations in the cluster and none of them are set as the default.
Use Case
Say that you're trying to expose the primary replica via a LoadBalancer. Currently, there is no field in the PostgresClusters spec to set additional properties, such as loadBalancerClass. If this can't be set via the PostgresClusters object, then the options are either:
Use a mutating admission webhook on the cluster to set the loadBalancerClass if one is not set
OR
Create an additional Service object in the namespace and set it's label selectors to point to the desired Pod
Desired Behavior
The PostgresClusters CRD, and any other resource that allows creating a Service of type LoadBalancer, should allow setting the loadBalancerClass and propagating this onto the generated Service object(s).
Environment
Environment agnostic, but in our case we're using multiple copies of MetalLB to provide multiple LoadBalancer implementations, without a default set for the cluster.
Overview
When exposing a Service of type
LoadBalancer
, it can be useful to set the.spec.loadBalancerClass
field in case there are multiple implementations in the cluster and none of them are set as the default.Use Case
Say that you're trying to expose the primary replica via a
LoadBalancer
. Currently, there is no field in thePostgresClusters
spec to set additional properties, such asloadBalancerClass
. If this can't be set via thePostgresClusters
object, then the options are either:loadBalancerClass
if one is not setOR
Service
object in the namespace and set it's label selectors to point to the desired PodDesired Behavior
The
PostgresClusters
CRD, and any other resource that allows creating a Service of typeLoadBalancer
, should allow setting theloadBalancerClass
and propagating this onto the generated Service object(s).Environment
Environment agnostic, but in our case we're using multiple copies of MetalLB to provide multiple
LoadBalancer
implementations, without a default set for the cluster.Kubernetes
1.26.17
ubi8-5.6.0-0
15
Additional Information
The text was updated successfully, but these errors were encountered: