upmc-enterprises/elasticsearch-operator

Error building master - initDaemonspace

karlskewes opened this issue · 1 comments

Have deleted existing directory and done a fresh clone of repo.

$ make build
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -o _output/bin/elasticsearch-operator --ldflags '-w' ./cmd/operator/main.go
# command-line-arguments
cmd/operator/main.go:85:31: too many arguments in call to k8sutil.New
        have (string, string, bool, string, string)
        want (string, string, string, string)
Makefile:15: recipe for target 'build' failed
make: *** [build] Error 2

Checking how k8sutil.New is being invoked, and it matches the have above:

$ grep -nr "k8sutil.New"
cmd/operator/main.go:85:        k8sclient, err := k8sutil.New(kubeCfgFile, masterHost, enableInitDaemonset, initDaemonsetNamespace, busyboxImage)

Checking k8sutil.Net function definition:

$ grep -nr "New(" pkg/k8sutil/k8sutil.go 
95:func New(kubeCfgFile, masterHost string, enableInitDaemonset bool, initDaemonsetNamespace, busyboxImage string) (*K8sutil, error) {

main.go looks like it imports k8sutil.go, but the repo looks fine.
I can't find any 'pinned to git commit version' stuff anywhere.

Apart from maybe doing initDaemonsetNamespace string I can't see any errors here.
Have been through a few likely-to-be-related commits but might have missed something.

I can delete value enableInitDaemonset in 95:func New(kubeCfgFile, masterHost string, enableInitDaemonset bool.... and it builds.
However when using this build sgadmin certs are not being created.

Thoughts?

User error.
Was building old copy out of $GOPATH rather than where I cloned repo.