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

Expose CLI flag to tell Smee (Boots) on which interface to bind #8760

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
8 changes: 8 additions & 0 deletions pkg/providers/tinkerbell/stack/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ func (s *Installer) installBootsOnDocker(ctx context.Context, bundle releasev1al
"-dhcp-addr", "0.0.0.0:67",
"-osie-url", osiePath,
"-tink-server", fmt.Sprintf("%s:%s", tinkServerIP, grpcPort),
"--syslog-addr", fmt.Sprintf("%s:514", tinkServerIP),
"--tftp-addr", fmt.Sprintf("%s:69", tinkServerIP),
"--http-addr", fmt.Sprintf("%s:80", tinkServerIP),
"--dhcp-ip-for-packet", tinkServerIP,
"--dhcp-syslog-ip", tinkServerIP,
"--dhcp-tftp-ip", fmt.Sprintf("%s:69", tinkServerIP),
"--dhcp-http-ipxe-binary-url", fmt.Sprintf("http://%s:8080/ipxe/", tinkServerIP),
"--dhcp-http-ipxe-script-url", fmt.Sprintf("http://%s/auto.ipxe", tinkServerIP),
}
if err := s.docker.Run(ctx, s.localRegistryURL(bundle.Boots.URI), boots, cmd, flags...); err != nil {
return fmt.Errorf("running boots with docker: %v", err)
Expand Down
18 changes: 16 additions & 2 deletions pkg/providers/tinkerbell/stack/stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,28 @@ func TestTinkerbellStackInstallWithDifferentOptions(t *testing.T) {
if stackTest.installOnDocker {
docker.EXPECT().Run(ctx, "public.ecr.aws/eks-anywhere/boots:latest",
boots,
[]string{"-backend-kube-config", "/kubeconfig", "-dhcp-addr", "0.0.0.0:67", "-osie-url", "https://anywhere-assests.eks.amazonaws.com/tinkerbell/hook", "-tink-server", "1.2.3.4:42113"},
[]string{
"-backend-kube-config",
"/kubeconfig",
"-dhcp-addr", "0.0.0.0:67",
"-osie-url", "https://anywhere-assests.eks.amazonaws.com/tinkerbell/hook",
"-tink-server", "1.2.3.4:42113",
"--syslog-addr", fmt.Sprintf("%s:514", testIP),
"--tftp-addr", fmt.Sprintf("%s:69", testIP),
"--http-addr", fmt.Sprintf("%s:80", testIP),
"--dhcp-ip-for-packet", testIP,
"--dhcp-syslog-ip", testIP,
"--dhcp-tftp-ip", fmt.Sprintf("%s:69", testIP),
"--dhcp-http-ipxe-binary-url", fmt.Sprintf("http://%s:8080/ipxe/", testIP),
"--dhcp-http-ipxe-script-url", fmt.Sprintf("http://%s/auto.ipxe", testIP),
},
"-v", gomock.Any(),
"--network", "host",
"-e", gomock.Any(),
"-e", gomock.Any(),
"-e", gomock.Any(),
"-e", gomock.Any(),
)
).AnyTimes()
}

if err := s.Install(
Expand Down