diff --git a/pkg/models/config/cluster_nodes_lb.go b/pkg/models/config/cluster_nodes_lb.go index 32a3404b..83c518a0 100644 --- a/pkg/models/config/cluster_nodes_lb.go +++ b/pkg/models/config/cluster_nodes_lb.go @@ -61,10 +61,7 @@ func (lb *LB) SetDefaults() { lb.Instances[i].CPU = defaults.Default(lb.Instances[i].CPU, lb.Default.CPU) lb.Instances[i].RAM = defaults.Default(lb.Instances[i].RAM, lb.Default.RAM) lb.Instances[i].MainDiskSize = defaults.Default(lb.Instances[i].MainDiskSize, lb.Default.MainDiskSize) - - if len(lb.Instances) > 1 { - lb.Instances[i].Priority = defaults.Default(lb.Instances[i].Priority, &defaultPriority) - } + lb.Instances[i].Priority = defaults.Default(lb.Instances[i].Priority, &defaultPriority) } } diff --git a/pkg/models/config/cluster_nodes_lb_test.go b/pkg/models/config/cluster_nodes_lb_test.go index 26a0d8e0..503e6228 100644 --- a/pkg/models/config/cluster_nodes_lb_test.go +++ b/pkg/models/config/cluster_nodes_lb_test.go @@ -85,7 +85,6 @@ func TestLB_Defaults(t *testing.T) { defaults.Assign(&lb2) assert.Nil(t, lb1.VirtualRouterId, "LB VRID is set even if only one instance is configured!") - assert.Nil(t, lb1.Instances[0].Priority, "LB instance priority is set even if only one instance is configured!") assert.Equal(t, &defaultVRID, lb2.VirtualRouterId, "Default LB VRID is not set when multiple instances are configured!") assert.Equal(t, &defaultPriority, lb2.Instances[0].Priority, "Default LB instance priority is not set when multiple instances are configured!") }