@@ -38,6 +38,9 @@ const ControlPlanePort = 6443
38
38
// DefaultNetwork is the default network name to use in kind.
39
39
const DefaultNetwork = "kind"
40
40
41
+ // haproxyEntrypoint is the entrypoint used to start the haproxy load balancer container.
42
+ var haproxyEntrypoint = []string {"haproxy" , "-W" , "-db" , "-f" , "/usr/local/etc/haproxy/haproxy.cfg" }
43
+
41
44
// Manager is the kind manager type.
42
45
type Manager struct {}
43
46
@@ -46,6 +49,7 @@ type nodeCreateOpts struct {
46
49
Image string
47
50
ClusterName string
48
51
Role string
52
+ EntryPoint []string
49
53
Mounts []v1alpha4.Mount
50
54
PortMappings []v1alpha4.PortMapping
51
55
Labels map [string ]string
@@ -113,6 +117,7 @@ func (m *Manager) CreateExternalLoadBalancerNode(ctx context.Context, name, imag
113
117
ClusterName : clusterName ,
114
118
Role : constants .ExternalLoadBalancerNodeRoleValue ,
115
119
PortMappings : portMappings ,
120
+ EntryPoint : haproxyEntrypoint ,
116
121
}
117
122
node , err := createNode (ctx , createOpts )
118
123
if err != nil {
@@ -143,6 +148,7 @@ func createNode(ctx context.Context, opts *nodeCreateOpts) (*types.Node, error)
143
148
// filesystem, which is not only better for performance, but allows
144
149
// running kind in kind for "party tricks"
145
150
// (please don't depend on doing this though!)
151
+ Entrypoint : opts .EntryPoint ,
146
152
Volumes : map [string ]string {"/var" : "" },
147
153
Mounts : generateMountInfo (opts .Mounts ),
148
154
PortMappings : generatePortMappings (opts .PortMappings ),
0 commit comments