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
Update peerpodconfig-ctl dep #342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nit, s/ctl/ctrl/ in subject
@bpradipt does this mean that operator-sdk v1.28.0 should be used to build now ? |
@gkurz yes. I aligned the deps to the sdk version closest to existing deps https://github.com/operator-framework/operator-sdk/blob/v1.27.0/go.mod
https://github.com/operator-framework/operator-sdk/blob/v1.28.0/go.mod
Existing code
|
This means we're bumping from sdk v1.26.1 to v1.28.0. The following upgrade guidelines seem to indicate that we don't need to do any other specific change :
@bpradipt can you upgrade the sdk version in |
Right.
I'll also build a catalog so that we can do a pre-merge testing. |
Catalog: quay.io/bpradipt/openshift-sandboxed-containers-operator-catalog:v1.4.0 |
This results in some cascading issues and since the bulk of the changes are in go.mod this is done in the same commit. 1. Update deps to match operator-sdk v1.28.0 The existing deps didn't match any operator-sdk version. sdk v1.28.0 was the closest 2. Remove unncessary replace directives All the required dep versions are either direct or indirect. Having the same deps in replace makes upgrading the deps a challenge 3. Fix the following error: "/go/pkg/mod/k8s.io/client-go@v0.26.2/applyconfigurations/meta/v1/unstructured.go:64:38: cannot use doc (variable of type *"github.com/google/gnostic/openapiv2".Document) as *"github.com/google/gnostic-models/openapiv2".Document value in argument to proto.NewOpenAPIData" The error is due to pulling of a version of k8s.io/kube-openapi not matching the one mentioned in the go.mod of client-go@v0.26.2 The fix is replacing the k8s.io/kube-openapi module with the one mentioned in the go.mod of client-go@v0.26.2 - https://github.com/kubernetes/client-go/blob/v0.26.2/go.mod#L30C22-L30C56 The command to replace the module: go mod edit -replace k8s.io/kube-openapi=k8s.io/kube-openapi@v0.0.0-20221012153701-172d655c2280 4. k8s.io/kubernetes should not be used Reproducing the text here: To use Kubernetes code as a library in other applications, see the list of published components - https://github.com/kubernetes/kubernetes/blob/master/staging/README.md Use of the k8s.io/kubernetes module or k8s.io/kubernetes/... packages as libraries is not supported. Ref: https://pkg.go.dev/k8s.io/kubernetes#section-readme 5. Update peerpodconfig-ctl dep to include support for per-node peerpod limit Fixes: #KATA-2271 Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @bpradipt !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks!
Also update deps to match operator-sdk v1.28.0
Fixes: #KATA-2271