File tree 1 file changed +11
-1
lines changed
pkg/cluster/internal/create/actions/loadbalancer
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,17 @@ func (a *Action) Execute(ctx *actions.ActionContext) error {
60
60
ctx .Status .Start ("Starting the external load balancer ⚖️" )
61
61
defer ctx .Status .End (false )
62
62
63
+ err = ConfigHAProxy (loadBalancerNode , allNodes )
64
+ if err != nil {
65
+ return err
66
+ }
67
+
68
+ ctx .Status .End (true )
69
+ return nil
70
+ }
71
+
72
+ // ConfigHAProxy is common method for HAProxy
73
+ func ConfigHAProxy (loadBalancerNode * nodes.Node , allNodes []nodes.Node ) error {
63
74
// collect info about the existing controlplane nodes
64
75
var backendServers = map [string ]string {}
65
76
controlPlaneNodes , err := nodes .SelectNodesByRole (
@@ -103,6 +114,5 @@ func (a *Action) Execute(ctx *actions.ActionContext) error {
103
114
return errors .Wrap (err , "failed to start haproxy" )
104
115
}
105
116
106
- ctx .Status .End (true )
107
117
return nil
108
118
}
You can’t perform that action at this time.
0 commit comments