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

Support for Go version 1.21 #6644

Closed
Tracked by #157782
SuchitraShelke opened this issue Dec 19, 2023 · 5 comments · Fixed by operator-framework/ansible-operator-plugins#56
Closed
Tracked by #157782

Support for Go version 1.21 #6644

SuchitraShelke opened this issue Dec 19, 2023 · 5 comments · Fixed by operator-framework/ansible-operator-plugins#56
Milestone

Comments

@SuchitraShelke
Copy link

Type of question

Open question

Question

What did you do?

Using operator-sdk images as base image in our docker file
FROM quay.io/operator-framework/ansible-operator:v1.33.0

What did you expect to see? :

Want to upgrade internal Go version used by base image to 1.21.x.

What did you see instead? Under which circumstances?

Even after using latest operator-sdk image [ 1.33 ] , getting Go version as 1.20.11 .

sh-4.4$ ansible-operator version
ansible-operator version: "v1.33.0", commit: "23ab2b642f96c18070b7666a7d8f97797be2c27b", kubernetes version: "v1.27.0", go version: "go1.20.11", GOOS: "linux", GOARCH: "amd64"

Environment

Operator type: Ansible & helm

Kubernetes cluster type: OCP

$ operator-sdk version : v1.33.0

$ go version (if language is Go) : go1.20.11

$ kubectl version : v1.27.0

Additional context

In the internal security scan for my product getting some critical PSIRT raised because of the Go version used in operator-sdk base image . And to address those have to upgrade Go version to 1.21.x .
So wanted to know when new operator-sdk release/image will be available with Go version uplifted to 1.21.x

@SuchitraShelke
Copy link
Author

For helm-operator , found that Go version is upgraded to 1.21 :

bash-4.4# helm-operator version
helm-operator version: "v1.33.0", commit: "542966812906456a8d67cf7284fc6410b104e118", kubernetes version: "v1.27.0", go version: "go1.21.5", GOOS: "linux", GOARCH: "amd64"

which can be seen here as well :

FROM --platform=$BUILDPLATFORM golang:1.21 as builder

But for ansible operator, I think code is refactored & maintained here : https://github.com/operator-framework/ansible-operator-plugins
And in this git repo, Go version used is 1.20 : https://github.com/operator-framework/ansible-operator-plugins/blob/23ab2b642f96c18070b7666a7d8f97797be2c27b/go.mod#L3C3-L3C3

Because of this might be ansible-operator version 1.33 is showing Go version as 1.20.11.
Now the question is , by when we can expect Go version for ansible operator getting upgraded to 1.21.x [ may be in this repo ] ?

@stefanb
Copy link

stefanb commented Jan 5, 2024

It is not working with Go 1.22 either, see Homebrew/homebrew-core#157782

Also note, that when Go 1.22 is released (scheduled for February) the Go 1.20 will become unsupported.

@varshaprasad96
Copy link
Member

@everettraven would be taking a look at the go version for the base images. Will update here accordingly.
@SuchitraShelke would you be open to helping with this issue? Thank you!

@varshaprasad96 varshaprasad96 added this to the v1.34.0 milestone Jan 8, 2024
@everettraven
Copy link
Contributor

Maybe we need to bump the version at https://github.com/operator-framework/operator-sdk/blob/master/images/operator-sdk/Dockerfile#L22 as well?

@Neo2308 This looks to be correct

Because of this might be ansible-operator version 1.33 is showing Go version as 1.20.11.
Now the question is , by when we can expect Go version for ansible operator getting upgraded to 1.21.x [ may be in this repo ] ?

@SuchitraShelke That repo is correct for the ansible operator. The binary in the base image there is built with the same go version in the projects go.mod file which is currently go 1.20. I'm not sure if there are plans to update this outside of the regular k8s version bumps (which is typically when we update the go version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants