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

Bump go modules #853

Merged
merged 3 commits into from
Jul 8, 2022
Merged

Conversation

manno
Copy link
Member

@manno manno commented Jul 4, 2022

This bumps all the go modules at once, due to the many, very broad, 'replace' directives I couldn't find a smaller set.

I also had to copy the 'diff' package from argoproj. The modules have not been updated upstream and we want a newer k8s.io/api. I think copying is better than forking, at least temporary. According to https://blog.argoproj.io/argo-cd-v1-6-democratizing-gitops-with-gitops-engine-5a17cfc87d62 the diff package is meant to be a publicly reusable library. We could switch back to the import once gitops-engine is updated, however we also import from argo-cd, which we should avoid I think.
Looking at a snyk scan of our go modules, we import too much from argo-cd. So maybe importing the gitops-engine and copying/vendoring the argo-cd files, in the future?

Since argo-cd and gitops-engine use the server scheme from k8s.io/kubernetes we need to work around 'unknown revision 0.0.0' errors, by including replace statements in the go.mod file: kubernetes/issues/79384

Vendoring the argoproj files helps with updating k8s, but is not enough
to get rid of the replace statements: argoproj/gitops-engine#56

Fixes #745

@manno manno force-pushed the bump-gomod-kustomize-wrangler-helm branch 2 times, most recently from 70e3eeb to 1607f6d Compare July 5, 2022 13:30
Mario Manno added 3 commits July 5, 2022 16:45
Switch from go-openapi to kube-openapi spec
Kubernetes hasn't been updated in argoproj.
The files have been copied and import paths have been adapted.

Since argo-cd and gitops-engine use the server scheme from
k8s.io/kubernetes we need to work around 'unknown revision 0.0.0'
errors, by including replace statements in the go.mod file.

kubernetes/issues/79384

Vendoring the argoproj files helps with updating k8s, but is not enough
to get rid of the replace statements.

argoproj/gitops-engine/issues/56
@manno manno force-pushed the bump-gomod-kustomize-wrangler-helm branch from 1607f6d to 701a2f6 Compare July 5, 2022 14:46
@manno manno marked this pull request as ready for review July 5, 2022 15:12
Copy link
Collaborator

@mattfarina mattfarina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manno I've started to review this one. I paired with Arvind for a short bit to discuss it.

At first we considered the case of using k8s 1.23 packages since there is a version skew of +/-1 so that would provide k8s 1.24 support. But, wrangler has already updated to k8s 1.24 so that wouldn't work. vendoring part of argo works for the time being.

I'm still reviewing so I'll come back to this. Just wanted to give you an update.

@mattfarina
Copy link
Collaborator

@manno can you please create a PR to cherry-pick this into the release branch?

@mattfarina mattfarina merged commit 9b52447 into rancher:master Jul 8, 2022
@manno manno deleted the bump-gomod-kustomize-wrangler-helm branch October 10, 2022 14:20
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 this pull request may close these issues.

Update kustomize version that fleet uses
2 participants