Make ReplicaLoadBalancer a pointer to handle the case when it is unset

This commit is contained in:
Sergey Dudoladov 2018-03-02 12:00:02 +01:00
parent e74c05fec9
commit 18741750f5
1 changed files with 3 additions and 2 deletions

View File

@ -99,7 +99,8 @@ type PostgresSpec struct {
// EnableLoadBalancer is a pointer, since it is important to know if that parameters is omitted from the Postgres manifest
// in that case UseLoadBalancer == nil and the value is taken from the operator config
UseLoadBalancer *bool `json:"useLoadBalancer,omitempty"`
ReplicaLoadBalancer bool `json:"replicaLoadBalancer,omitempty"`
// if ReplicaLoadBalancer == nil (is unset), value of UseLoadBalancer takes priority
ReplicaLoadBalancer *bool `json:"replicaLoadBalancer,omitempty"`
NumberOfInstances int32 `json:"numberOfInstances"`
Users map[string]UserFlags `json:"users"`
MaintenanceWindows []MaintenanceWindow `json:"maintenanceWindows,omitempty"`