Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.3] 🐛 CAPD: change the haproxy entrypoint to prevent getting stopped immediately after start #8741

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/infrastructure/docker/internal/docker/kind_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const ControlPlanePort = 6443
// DefaultNetwork is the default network name to use in kind.
const DefaultNetwork = "kind"

// haproxyEntrypoint is the entrypoint used to start the haproxy load balancer container.
var haproxyEntrypoint = []string{"haproxy", "-W", "-db", "-f", "/usr/local/etc/haproxy/haproxy.cfg"}

// Manager is the kind manager type.
type Manager struct{}

Expand All @@ -46,6 +49,7 @@ type nodeCreateOpts struct {
Image string
ClusterName string
Role string
EntryPoint []string
Mounts []v1alpha4.Mount
PortMappings []v1alpha4.PortMapping
Labels map[string]string
Expand Down Expand Up @@ -113,6 +117,7 @@ func (m *Manager) CreateExternalLoadBalancerNode(ctx context.Context, name, imag
ClusterName: clusterName,
Role: constants.ExternalLoadBalancerNodeRoleValue,
PortMappings: portMappings,
EntryPoint: haproxyEntrypoint,
}
node, err := createNode(ctx, createOpts)
if err != nil {
Expand Down Expand Up @@ -143,6 +148,7 @@ func createNode(ctx context.Context, opts *nodeCreateOpts) (*types.Node, error)
// filesystem, which is not only better for performance, but allows
// running kind in kind for "party tricks"
// (please don't depend on doing this though!)
Entrypoint: opts.EntryPoint,
Volumes: map[string]string{"/var": ""},
Mounts: generateMountInfo(opts.Mounts),
PortMappings: generatePortMappings(opts.PortMappings),
Expand Down