Set the workdir to / via a custom entrypoint
While !4 (merged) has fixed the issue of architecture detection, not setting the
working directory to /
has introduced another set of issues, such as
root@deploy1003:/home/brouberol# kubectl logs pgcluster-example-1-initdb-c7wrs -n pgcluster-test -c bootstrap-controller
{"level":"info","ts":"2024-08-05T14:24:39Z","msg":"Installing the manager executable","destination":"/controller/manager","version":"1.23.3","build":{"Version":"1.23.3","Commit":"none","Date":"unknown"}}
panic: open manager: no such file or directory
goroutine 1 [running]:
main.main.NewCmd.func3(0xc00033e308, {0xc00062f9c0?, 0x4?, 0x217d2d8?})
/build/internal/cmd/manager/bootstrap/cmd.go:44 +0x1d5
github.com/spf13/cobra.(*Command).execute(0xc00033e308, {0xc00062f9a0, 0x2, 0x2})
/home/somebody/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:985 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001c3b08)
/home/somebody/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/home/somebody/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041
main.main()
/build/cmd/manager/main.go:66 +0x43e
As blubber does not let us specify the workdir as /
, we resort to a custom entrypoint
that sets the workdir to /
before exec
ing the expected command.
Bug: T364797