Rename to enable_master_pooler_load_balancer
Signed-off-by: Sergey Shatunov <me@prok.pw>
This commit is contained in:
		
							parent
							
								
									31d04cbdfc
								
							
						
					
					
						commit
						f45fc5cffe
					
				|  | @ -163,8 +163,8 @@ configLoadBalancer: | ||||||
|   enable_master_load_balancer: false |   enable_master_load_balancer: false | ||||||
|   # toggles service type load balancer pointing to the replica pod of the cluster |   # toggles service type load balancer pointing to the replica pod of the cluster | ||||||
|   enable_replica_load_balancer: false |   enable_replica_load_balancer: false | ||||||
|   # toggles service type load balancer pointing to the pooler pod of the cluster |   # toggles service type load balancer pointing to the master pooler pod of the cluster | ||||||
|   enable_pooler_load_balancer: false |   enable_master_pooler_load_balancer: false | ||||||
|   # defines the DNS name string template for the master load balancer cluster |   # defines the DNS name string template for the master load balancer cluster | ||||||
|   master_dns_name_format: "{cluster}.{team}.{hostedzone}" |   master_dns_name_format: "{cluster}.{team}.{hostedzone}" | ||||||
|   # defines the DNS name string template for the replica load balancer cluster |   # defines the DNS name string template for the replica load balancer cluster | ||||||
|  |  | ||||||
|  | @ -154,8 +154,8 @@ configLoadBalancer: | ||||||
|   enable_master_load_balancer: "false" |   enable_master_load_balancer: "false" | ||||||
|   # toggles service type load balancer pointing to the replica pod of the cluster |   # toggles service type load balancer pointing to the replica pod of the cluster | ||||||
|   enable_replica_load_balancer: "false" |   enable_replica_load_balancer: "false" | ||||||
|   # toggles service type load balancer pointing to the pooler pod of the cluster |   # toggles service type load balancer pointing to the master pooler pod of the cluster | ||||||
|   enable_pooler_load_balancer: "false" |   enable_master_pooler_load_balancer: "false" | ||||||
|   # defines the DNS name string template for the master load balancer cluster |   # defines the DNS name string template for the master load balancer cluster | ||||||
|   master_dns_name_format: '{cluster}.{team}.{hostedzone}' |   master_dns_name_format: '{cluster}.{team}.{hostedzone}' | ||||||
|   # defines the DNS name string template for the replica load balancer cluster |   # defines the DNS name string template for the replica load balancer cluster | ||||||
|  |  | ||||||
|  | @ -197,7 +197,7 @@ spec: | ||||||
|                   type: boolean |                   type: boolean | ||||||
|                 enable_replica_load_balancer: |                 enable_replica_load_balancer: | ||||||
|                   type: boolean |                   type: boolean | ||||||
|                 enable_pooler_load_balancer: |                 enable_master_pooler_load_balancer: | ||||||
|                   type: boolean |                   type: boolean | ||||||
|                 master_dns_name_format: |                 master_dns_name_format: | ||||||
|                   type: string |                   type: string | ||||||
|  |  | ||||||
|  | @ -156,7 +156,7 @@ spec: | ||||||
|               type: boolean |               type: boolean | ||||||
|             enableReplicaLoadBalancer: |             enableReplicaLoadBalancer: | ||||||
|               type: boolean |               type: boolean | ||||||
|             enablePoolerLoadBalancer: |             enableMasterPoolerLoadBalancer: | ||||||
|               type: boolean |               type: boolean | ||||||
|             enableShmVolume: |             enableShmVolume: | ||||||
|               type: boolean |               type: boolean | ||||||
|  |  | ||||||
|  | @ -97,13 +97,13 @@ type OperatorTimeouts struct { | ||||||
| 
 | 
 | ||||||
| // LoadBalancerConfiguration defines the LB configuration
 | // LoadBalancerConfiguration defines the LB configuration
 | ||||||
| type LoadBalancerConfiguration struct { | type LoadBalancerConfiguration struct { | ||||||
| 	DbHostedZone              string                `json:"db_hosted_zone,omitempty"` | 	DbHostedZone                    string                `json:"db_hosted_zone,omitempty"` | ||||||
| 	EnableMasterLoadBalancer  bool                  `json:"enable_master_load_balancer,omitempty"` | 	EnableMasterLoadBalancer        bool                  `json:"enable_master_load_balancer,omitempty"` | ||||||
| 	EnableReplicaLoadBalancer bool                  `json:"enable_replica_load_balancer,omitempty"` | 	EnableReplicaLoadBalancer       bool                  `json:"enable_replica_load_balancer,omitempty"` | ||||||
| 	EnablePoolerLoadBalancer  bool                  `json:"enable_pooler_load_balancer,omitempty"` | 	EnableMasterPoolerLoadBalancer  bool                  `json:"enable_master_pooler_load_balancer,omitempty"` | ||||||
| 	CustomServiceAnnotations  map[string]string     `json:"custom_service_annotations,omitempty"` | 	CustomServiceAnnotations        map[string]string     `json:"custom_service_annotations,omitempty"` | ||||||
| 	MasterDNSNameFormat       config.StringTemplate `json:"master_dns_name_format,omitempty"` | 	MasterDNSNameFormat             config.StringTemplate `json:"master_dns_name_format,omitempty"` | ||||||
| 	ReplicaDNSNameFormat      config.StringTemplate `json:"replica_dns_name_format,omitempty"` | 	ReplicaDNSNameFormat            config.StringTemplate `json:"replica_dns_name_format,omitempty"` | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // AWSGCPConfiguration defines the configuration for AWS
 | // AWSGCPConfiguration defines the configuration for AWS
 | ||||||
|  |  | ||||||
|  | @ -39,9 +39,9 @@ type PostgresSpec struct { | ||||||
| 
 | 
 | ||||||
| 	// vars that enable load balancers are pointers because it is important to know if any of them is omitted from the Postgres manifest
 | 	// vars that enable load balancers are pointers because it is important to know if any of them is omitted from the Postgres manifest
 | ||||||
| 	// in that case the var evaluates to nil and the value is taken from the operator config
 | 	// in that case the var evaluates to nil and the value is taken from the operator config
 | ||||||
| 	EnableMasterLoadBalancer  *bool `json:"enableMasterLoadBalancer,omitempty"` | 	EnableMasterLoadBalancer        *bool `json:"enableMasterLoadBalancer,omitempty"` | ||||||
| 	EnableReplicaLoadBalancer *bool `json:"enableReplicaLoadBalancer,omitempty"` | 	EnableReplicaLoadBalancer       *bool `json:"enableReplicaLoadBalancer,omitempty"` | ||||||
| 	EnablePoolerLoadBalancer  *bool `json:"enablePoolerLoadBalancer,omitempty"` | 	EnableMasterPoolerLoadBalancer  *bool `json:"enableMasterPoolerLoadBalancer,omitempty"` | ||||||
| 
 | 
 | ||||||
| 	// deprecated load balancer settings maintained for backward compatibility
 | 	// deprecated load balancer settings maintained for backward compatibility
 | ||||||
| 	// see "Load balancers" operator docs
 | 	// see "Load balancers" operator docs
 | ||||||
|  |  | ||||||
|  | @ -525,8 +525,8 @@ func (in *PostgresSpec) DeepCopyInto(out *PostgresSpec) { | ||||||
| 		*out = new(bool) | 		*out = new(bool) | ||||||
| 		**out = **in | 		**out = **in | ||||||
| 	} | 	} | ||||||
| 	if in.EnablePoolerLoadBalancer != nil { | 	if in.EnableMasterPoolerLoadBalancer != nil { | ||||||
| 		in, out := &in.EnablePoolerLoadBalancer, &out.EnablePoolerLoadBalancer | 		in, out := &in.EnableMasterPoolerLoadBalancer, &out.EnableMasterPoolerLoadBalancer | ||||||
| 		*out = new(bool) | 		*out = new(bool) | ||||||
| 		**out = **in | 		**out = **in | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -2211,11 +2211,11 @@ func (c *Cluster) generateConnectionPoolerDeployment(spec *acidv1.PostgresSpec) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c *Cluster) shouldCreateLoadBalancerForPoolerService(spec *acidv1.PostgresSpec) bool { | func (c *Cluster) shouldCreateLoadBalancerForPoolerService(spec *acidv1.PostgresSpec) bool { | ||||||
| 	if spec.EnablePoolerLoadBalancer != nil { | 	if spec.EnableMasterPoolerLoadBalancer != nil { | ||||||
| 		return *spec.EnablePoolerLoadBalancer | 		return *spec.EnableMasterPoolerLoadBalancer | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	return c.OpConfig.EnablePoolerLoadBalancer | 	return c.OpConfig.EnableMasterPoolerLoadBalancer | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c *Cluster) generateConnectionPoolerService(spec *acidv1.PostgresSpec) *v1.Service { | func (c *Cluster) generateConnectionPoolerService(spec *acidv1.PostgresSpec) *v1.Service { | ||||||
|  |  | ||||||
|  | @ -100,7 +100,7 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur | ||||||
| 	result.DbHostedZone = fromCRD.LoadBalancer.DbHostedZone | 	result.DbHostedZone = fromCRD.LoadBalancer.DbHostedZone | ||||||
| 	result.EnableMasterLoadBalancer = fromCRD.LoadBalancer.EnableMasterLoadBalancer | 	result.EnableMasterLoadBalancer = fromCRD.LoadBalancer.EnableMasterLoadBalancer | ||||||
| 	result.EnableReplicaLoadBalancer = fromCRD.LoadBalancer.EnableReplicaLoadBalancer | 	result.EnableReplicaLoadBalancer = fromCRD.LoadBalancer.EnableReplicaLoadBalancer | ||||||
| 	result.EnablePoolerLoadBalancer = fromCRD.LoadBalancer.EnablePoolerLoadBalancer | 	result.EnableMasterPoolerLoadBalancer = fromCRD.LoadBalancer.EnableMasterPoolerLoadBalancer | ||||||
| 	result.CustomServiceAnnotations = fromCRD.LoadBalancer.CustomServiceAnnotations | 	result.CustomServiceAnnotations = fromCRD.LoadBalancer.CustomServiceAnnotations | ||||||
| 	result.MasterDNSNameFormat = fromCRD.LoadBalancer.MasterDNSNameFormat | 	result.MasterDNSNameFormat = fromCRD.LoadBalancer.MasterDNSNameFormat | ||||||
| 	result.ReplicaDNSNameFormat = fromCRD.LoadBalancer.ReplicaDNSNameFormat | 	result.ReplicaDNSNameFormat = fromCRD.LoadBalancer.ReplicaDNSNameFormat | ||||||
|  |  | ||||||
|  | @ -135,7 +135,7 @@ type Config struct { | ||||||
| 	EnableAdminRoleForUsers                bool              `name:"enable_admin_role_for_users" default:"true"` | 	EnableAdminRoleForUsers                bool              `name:"enable_admin_role_for_users" default:"true"` | ||||||
| 	EnableMasterLoadBalancer               bool              `name:"enable_master_load_balancer" default:"true"` | 	EnableMasterLoadBalancer               bool              `name:"enable_master_load_balancer" default:"true"` | ||||||
| 	EnableReplicaLoadBalancer              bool              `name:"enable_replica_load_balancer" default:"false"` | 	EnableReplicaLoadBalancer              bool              `name:"enable_replica_load_balancer" default:"false"` | ||||||
| 	EnablePoolerLoadBalancer               bool              `name:"enable_pooler_load_balancer" default:"false"` | 	EnableMasterPoolerLoadBalancer         bool              `name:"enable_master_pooler_load_balancer" default:"false"` | ||||||
| 	CustomServiceAnnotations               map[string]string `name:"custom_service_annotations"` | 	CustomServiceAnnotations               map[string]string `name:"custom_service_annotations"` | ||||||
| 	CustomPodAnnotations                   map[string]string `name:"custom_pod_annotations"` | 	CustomPodAnnotations                   map[string]string `name:"custom_pod_annotations"` | ||||||
| 	EnablePodAntiAffinity                  bool              `name:"enable_pod_antiaffinity" default:"false"` | 	EnablePodAntiAffinity                  bool              `name:"enable_pod_antiaffinity" default:"false"` | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue