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

Prepare for go1.18 #243

Closed
joelddiaz opened this issue Apr 4, 2022 · 5 comments · Fixed by #401
Closed

Prepare for go1.18 #243

joelddiaz opened this issue Apr 4, 2022 · 5 comments · Fixed by #401
Assignees
Labels
blocked Blocked by something enhancement New feature or request

Comments

@joelddiaz
Copy link
Contributor

Building with a freshly checked out repo, fails to install the controller-gen with golang 1.18.

jdiaz@joels-air ~  % go version
go version go1.18 darwin/arm64
jdiaz@joels-air projects  % mkdir test
jdiaz@joels-air projects  % cd test 
jdiaz@joels-air test  % git clone https://github.com/mondoohq/mondoo-operator.git
Cloning into 'mondoo-operator'...
remote: Enumerating objects: 1927, done.
remote: Counting objects: 100% (772/772), done.
remote: Compressing objects: 100% (246/246), done.
remote: Total 1927 (delta 656), reused 526 (delta 526), pack-reused 1155
Receiving objects: 100% (1927/1927), 569.14 KiB | 8.02 MiB/s, done.
Resolving deltas: 100% (1278/1278), done.
jdiaz@joels-air test  % cd mondoo-operator 
jdiaz@joels-air mondoo-operator (main) % make
go: creating new go.mod: module tmp
Downloading sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0
go: downloading sigs.k8s.io/controller-tools v0.7.0
go: downloading github.com/spf13/cobra v1.2.1
go: downloading golang.org/x/tools v0.1.5
go: downloading sigs.k8s.io/yaml v1.2.0
go: downloading github.com/fatih/color v1.12.0
go: downloading gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
go: downloading k8s.io/apiextensions-apiserver v0.22.2
go: downloading k8s.io/apimachinery v0.22.2
go: downloading k8s.io/api v0.22.2
go: downloading github.com/gobuffalo/flect v0.2.3
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a
go: downloading k8s.io/klog/v2 v2.9.0
go: downloading sigs.k8s.io/structured-merge-diff/v4 v4.1.2
go: downloading github.com/google/gofuzz v1.1.0
go: downloading golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
go: downloading gopkg.in/inf.v0 v0.9.1
go: downloading github.com/google/go-cmp v0.5.6
go: downloading github.com/go-logr/logr v0.4.0
go: downloading github.com/json-iterator/go v1.1.11
go: downloading golang.org/x/net v0.0.0-20210520170846-37e1c6afe023
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading golang.org/x/mod v0.4.2
go: downloading golang.org/x/text v0.3.6
go: added github.com/fatih/color v1.12.0
go: added github.com/go-logr/logr v0.4.0
go: added github.com/gobuffalo/flect v0.2.3
go: added github.com/gogo/protobuf v1.3.2
go: added github.com/google/go-cmp v0.5.6
go: added github.com/google/gofuzz v1.1.0
go: added github.com/inconshreveable/mousetrap v1.0.0
go: added github.com/json-iterator/go v1.1.11
go: added github.com/mattn/go-colorable v0.1.8
go: added github.com/mattn/go-isatty v0.0.12
go: added github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: added github.com/modern-go/reflect2 v1.0.1
go: added github.com/spf13/cobra v1.2.1
go: added github.com/spf13/pflag v1.0.5
go: added golang.org/x/mod v0.4.2
go: added golang.org/x/net v0.0.0-20210520170846-37e1c6afe023
go: added golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
go: added golang.org/x/text v0.3.6
go: added golang.org/x/tools v0.1.5
go: added golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: added gopkg.in/inf.v0 v0.9.1
go: added gopkg.in/yaml.v2 v2.4.0
go: added gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
go: added k8s.io/api v0.22.2
go: added k8s.io/apiextensions-apiserver v0.22.2
go: added k8s.io/apimachinery v0.22.2
go: added k8s.io/klog/v2 v2.9.0
go: added k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a
go: added sigs.k8s.io/controller-tools v0.7.0
go: added sigs.k8s.io/structured-merge-diff/v4 v4.1.2
go: added sigs.k8s.io/yaml v1.2.0
/Users/jdiaz/projects/test/mondoo-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
bash: /Users/jdiaz/projects/test/mondoo-operator/bin/controller-gen: No such file or directory
make: *** [generate] Error 127
jdiaz@joels-air mondoo-operator (main) % 

Fix this issue and any other others that keep us from building/developing mondoo-operator with go 1.18.

@imilchev imilchev added the enhancement New feature or request label May 2, 2022
@imilchev
Copy link
Member

imilchev commented May 2, 2022

This should be fixed by v1.21.0 of the operator-sdk according toi operator-framework/operator-sdk#5564. It seems to be scheduled for 18th May

@imilchev imilchev added the blocked Blocked by something label May 2, 2022
@imilchev
Copy link
Member

@imilchev
Copy link
Member

People are suggesting to install kubebuilder by using brew kubernetes-sigs/kubebuilder#1932 (comment). We should try to make it work without counting on that arm64 binary as the ticket for it is opened is January 2021

@joelddiaz
Copy link
Contributor Author

I was considering forking the install script for kustomize to allow specifying something like ./install_kustomize.sh VERSION PATH OVERRIDE_ARCH, which would allow bypassing the auto-arch-detection. But even then, MacOS complains about the binaries being unverified.

@czunker czunker self-assigned this Jun 22, 2022
@czunker
Copy link
Contributor

czunker commented Jun 22, 2022

Seems kubebuilder is making progress on the arm binary: kubernetes-sigs/kubebuilder#1932 (comment)

czunker added a commit that referenced this issue Jun 22, 2022
Also update tooling:
- controller-gen@v0.9.0
- operator-sdk@1.21.0
- kustomize@v4.5.5

Fixes #243

Signed-off-by: Christian Zunker <christian@mondoo.com>
czunker added a commit that referenced this issue Jun 24, 2022
* 🧹 Update to go 1.18

Also update tooling:
- controller-gen@v0.9.0
- operator-sdk@1.21.0
- kustomize@v4.5.5

* Use relative path for mockgen

Fixes #243

Signed-off-by: Christian Zunker <christian@mondoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by something enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants