File tree 1 file changed +10
-1
lines changed
pkg/cluster/internal/create/actions/loadbalancer
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,16 @@ 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
+ func ConfigHAProxy (loadBalancerNode * nodes.Node , allNodes []nodes.Node ) error {
63
73
// collect info about the existing controlplane nodes
64
74
var backendServers = map [string ]string {}
65
75
controlPlaneNodes , err := nodes .SelectNodesByRole (
@@ -103,6 +113,5 @@ func (a *Action) Execute(ctx *actions.ActionContext) error {
103
113
return errors .Wrap (err , "failed to start haproxy" )
104
114
}
105
115
106
- ctx .Status .End (true )
107
116
return nil
108
117
}
You can’t perform that action at this time.
0 commit comments