-
Notifications
You must be signed in to change notification settings - Fork 115
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
Upgrade Kubernetes schema and client libraries to v1.32 #3343
base: master
Are you sure you want to change the base?
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. New resources:
|
Note: need to merge in the deleted types to support customers of older clusters. |
Within the `tests/` and `provider/` folders, the following command was run: ```sh cat go.mod | grep "^\sk8s.io" | grep -v "// indirect" | awk '{print $1}' | xargs -I {} go get -u {}@v0.32.0-rc.0 ```3
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3343 +/- ##
=======================================
Coverage 41.08% 41.08%
=======================================
Files 85 85
Lines 12736 12736
=======================================
Hits 5232 5232
Misses 7115 7115
Partials 389 389 ☔ View full report in Codecov by Sentry. |
020af31
to
be4c345
Compare
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.
Took a quick look at https://kubernetes.io/docs/reference/using-api/deprecation-guide/ and I think this is accurate for v1.32 as well as a couple resources we might have missed.
diff --git a/provider/pkg/kinds/deprecated.go b/provider/pkg/kinds/deprecated.go
index efda53a52..51db13ec3 100644
--- a/provider/pkg/kinds/deprecated.go
+++ b/provider/pkg/kinds/deprecated.go
@@ -89,8 +89,11 @@ var v121 = cluster.ServerVersion{Major: 1, Minor: 21}
var v122 = cluster.ServerVersion{Major: 1, Minor: 22}
var v124 = cluster.ServerVersion{Major: 1, Minor: 24}
var v125 = cluster.ServerVersion{Major: 1, Minor: 25}
+var v126 = cluster.ServerVersion{Major: 1, Minor: 26}
var v127 = cluster.ServerVersion{Major: 1, Minor: 27}
+var v129 = cluster.ServerVersion{Major: 1, Minor: 29}
var v131 = cluster.ServerVersion{Major: 1, Minor: 31}
+var v132 = cluster.ServerVersion{Major: 1, Minor: 32}
func gvkStr(gvk schema.GroupVersionKind) string {
return gvk.GroupVersion().String() + "/" + gvk.Kind
@@ -298,6 +301,32 @@ func RemovedInVersion(gvk schema.GroupVersionKind) *cluster.ServerVersion {
return &v127
}
return nil
+ case AutoscalingV2B2:
+ if k == HorizontalPodAutoscaler {
+ return &v126
+ }
+ return nil
+ case FlowcontrolV1B1:
+ switch k {
+ case FlowSchema, PriorityLevelConfiguration:
+ return &v126
+ default:
+ return nil
+ }
+ case FlowcontrolV1B2:
+ switch k {
+ case FlowSchema, PriorityLevelConfiguration:
+ return &v129
+ default:
+ return nil
+ }
+ case FlowcontrolV1B3:
+ switch k {
+ case FlowSchema, PriorityLevelConfiguration:
+ return &v132
+ default:
+ return nil
+ }
default:
return nil
}
github.com/pkg/errors v0.9.1 | ||
github.com/pulumi/cloud-ready-checks v1.1.1-0.20241125001147-e1786eda07fe | ||
github.com/pulumi/cloud-ready-checks v1.1.1-0.20241203165528-1365154e0aa4 |
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.
I still question if this is necessary, since c-r-k's go.mod
simply specifies version minimums. e1786eda07fe
is still compatible with 1.32, so (in theory) we don't need to change anything, but version conflicts with k8s stuff never fail to surprise me so who knows...
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.
You're right that we don't really need to upgrade cloud-ready-checks for compatibility support - but rather, it's so we have consistency across our codebases. There was only 1 release in the past (iirc v1.29) that strictly required cloud-ready-checks to also be upgraded due to interface inconsistencies.
Proposed changes
Upgrade Kubernetes schema and client libraries to v1.32. Go is also updated to v1.23 as an upstream library requires this.
NOTE: This PR currently points to the first release candidate of v1.32 to surface any potential issues with upgrading. We'll need to point to the final release of v1.32 before we can merge this PR.
pulumi/cloud-ready-checks is also upgraded in pulumi/cloud-ready-checks#51
Related issues (optional)
Closes: #3295