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 kubernetes to 1.28.4 #556

Closed
wants to merge 1 commit into from

Conversation

farodin91
Copy link

No description provided.

@majolo
Copy link

majolo commented Dec 4, 2023

This would be useful for us, I was also about to look into upgrading! Is there any reason you chose not to upgrade to v1.28.4 of k8s.io/kubernetes and go 1.21?

Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (4a5648e) 54.70% compared to head (3580f83) 54.78%.
Report is 1 commits behind head on master.

❗ Current head 3580f83 differs from pull request most recent head dc1d73d. Consider uploading reports for the commit dc1d73d to get more accurate results

Files Patch % Lines
pkg/sync/sync_context.go 79.16% 3 Missing and 2 partials ⚠️
pkg/utils/kube/resource_ops.go 0.00% 4 Missing ⚠️
pkg/utils/kube/kube.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #556      +/-   ##
==========================================
+ Coverage   54.70%   54.78%   +0.08%     
==========================================
  Files          41       41              
  Lines        4645     4636       -9     
==========================================
- Hits         2541     2540       -1     
+ Misses       1908     1899       -9     
- Partials      196      197       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@farodin91 farodin91 changed the title Bump kubernetes to 1.27.8 Bump kubernetes to 1.28.4 Dec 4, 2023
Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
@farodin91
Copy link
Author

This would be useful for us, I was also about to look into upgrading! Is there any reason you chose not to upgrade to v1.28.4 of k8s.io/kubernetes and go 1.21?

Updated.

Copy link

sonarcloud bot commented Dec 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

@majolo majolo left a comment

Choose a reason for hiding this comment

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

This looks good to me, would be great to get a maintainer to approve and merge this if they're happy 👍 Perhaps @crenshaw-dev ?

@crenshaw-dev
Copy link
Member

Thanks so much for picking this up, @majolo! I'm going to wait until we cut Argo CD 2.10 before tackling this, since we have some other high-priority changes we want to get in.

@farodin91
Copy link
Author

@crenshaw-dev Sounds great. Do you have a time range? We are blocked by this as we can't upgrade to a newer version of kubebuilder.

@crenshaw-dev
Copy link
Member

@farodin91 the earliest will be > next Monday.

I'll go ahead and give a quick first-pass review so we can knock out any basic concerns.

pkg/utils/kube/kube.go Show resolved Hide resolved
Comment on lines -270 to -271
o.DryRunVerifier = resource.NewQueryParamVerifier(dynamicClient, k.fact.OpenAPIGetter(), resource.QueryParamFieldValidation)
o.FieldValidationVerifier = resource.NewQueryParamVerifier(dynamicClient, k.fact.OpenAPIGetter(), resource.QueryParamFieldValidation)
Copy link
Member

Choose a reason for hiding this comment

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

Do you know why these fields were removed from the upstream struct? Do we need to be switching to some other mechanism of providing these arguments?

Copy link

Choose a reason for hiding this comment

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

I made a similar change in our fork - without much digging, the following seemed to suggest just removing these is the correct approach?

https://github.com/kubernetes/kubernetes/pull/114294/files
https://github.com/kubernetes/kubernetes/pull/114413/files

Copy link
Member

Choose a reason for hiding this comment

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

Yep, that's correct. I later learned that both of those verifiers are designed for use with very old Kubernetes versions. Safe to remove now.

@majolo
Copy link

majolo commented Dec 12, 2023

Thanks @crenshaw-dev could this not be cut first and then included in argo-cd 2.10? It's actually argo-cd that we use (which in turn imports this library) which is causing us the issues.

@crenshaw-dev
Copy link
Member

@majolo theoretically, yes. But practically speaking, no. Before this can be merged, a similar PR will need to be made on the argo-cd repo and reviewed/tested. With those two PRs together, I just don't think I'll have time to review/merge before we cut RC1 Monday.

@dfroberg
Copy link

Any chance of getting this one bumped together with this one:
#558

@majolo
Copy link

majolo commented Jan 12, 2024

@crenshaw-dev any update on this one? Thanks!

@asaf-erlich
Copy link

Hello 👋 , our team owns an internal tool that interacts with both argo cd and k8s. As part of the recent upgrade a different team is making to all our k8s clusters to 1.27+ I'm trying to upgrade our tool's internal libraries. When doing so the gitops-engine dependency, even if I bump it to the sha in main/master is not able to compile and is blocking the upgrade.

This PR's code works perfectly with no compile errors (I checked out the forked code locally). I would love to know a rough timeline of when this could get merged? Alternatively if you're willing to push a tag or something so my go.mod file could depend on it. This would be greatly appreciated 🙏

@crenshaw-dev
Copy link
Member

@asaf-erlich we can start working on getting this merged now.

Would you mind rebasing?

Could you also open a PR on argo-cd pointing to the latest commit of your fork/branch? Here's an example of what that change looks like. argoproj/argo-cd@90ce09a

That PR will let us run Argo CD's tests and catch any issues which weren't revealed by the gitops-engine tests.

@crenshaw-dev
Copy link
Member

Looks like we could actually go to 1.28.6 or to 1.29.1 at this point.

@asaf-erlich
Copy link

@crenshaw-dev I'm not the original author of the PR, @farodin91 is. I'm happy to attempt those things it will help but would need to create a new PR to do so. I'd like to give @farodin91 at least a day or two to respond and if they cannot do it I can try to do so.

@farodin91
Copy link
Author

@crenshaw-dev I'm not the original author of the PR, @farodin91 is. I'm happy to attempt those things it will help but would need to create a new PR to do so. I'd like to give @farodin91 at least a day or two to respond and if they cannot do it I can try to do so.

Go for it. I'm on vacation and next in this week or next week.

@asaf-erlich
Copy link

Go for it. I'm on vacation and next in this week or next week.

I'll give it a try

@asaf-erlich
Copy link

Here is the rebased PR: #565

@asaf-erlich
Copy link

asaf-erlich commented Jan 23, 2024

Could you also open a PR on argo-cd pointing to the latest commit of your fork/branch? Here's an example of what that change looks like. argoproj/argo-cd@90ce09a

That PR will let us run Argo CD's tests and catch any issues which weren't revealed by the gitops-engine tests.

Looking at the PR and at https://stackoverflow.com/questions/72312460/how-to-replace-a-go-module-with-a-major-version-to-a-fork-master I will need to edit my own fork's go.mod file, at least temporarily, to declare a different name.

Edit: maybe I'll just push that rename to a different branch and create a tag instead to avoid messing with my PR

@asaf-erlich
Copy link

My first attempt at the test PR (left it in draft state): argoproj/argo-cd#16967

@recharte
Copy link

recharte commented Apr 9, 2024

Hi @asaf-erlich and @crenshaw-dev, would you by any chance be able to drive this effort to completion?

I'm in a similar situation as the one described by @asaf-erlich and would greatly benefit from this upgrade. I would even advocate for going a bit further and bumping to 1.29.x, if possible.

@asaf-erlich
Copy link

Unfortunately I don't have the time to make the required changes.

@crenshaw-dev
Copy link
Member

Focusing effort on this PR: #566

@blakepettersson
Copy link
Member

Superceded by #566.

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.

7 participants