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

Upgrade Kubernetes schema and client libraries to v1.32 #3343

Merged
merged 8 commits into from
Dec 12, 2024

Conversation

rquitales
Copy link
Member

@rquitales rquitales commented Dec 3, 2024

Proposed changes

Upgrade Kubernetes schema and client libraries to v1.32. Go is also updated to v1.23 as an upstream library requires this.

Related issues (optional)

Closes: #3295

@rquitales rquitales changed the title Upgrade Kubernetes schema and client libraries to v1.3 Upgrade Kubernetes schema and client libraries to v1.32 Dec 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

Does the PR have any schema changes?

Looking good! No breaking changes found.

New resources:

  • admissionregistration.k8s.io/v1alpha1.MutatingAdmissionPolicy
  • admissionregistration.k8s.io/v1alpha1.MutatingAdmissionPolicyBinding
  • admissionregistration.k8s.io/v1alpha1.MutatingAdmissionPolicyBindingList
  • admissionregistration.k8s.io/v1alpha1.MutatingAdmissionPolicyBindingPatch
  • admissionregistration.k8s.io/v1alpha1.MutatingAdmissionPolicyList
  • admissionregistration.k8s.io/v1alpha1.MutatingAdmissionPolicyPatch
  • coordination.k8s.io/v1alpha2.LeaseCandidate
  • coordination.k8s.io/v1alpha2.LeaseCandidateList
  • coordination.k8s.io/v1alpha2.LeaseCandidatePatch
  • resource.k8s.io/v1alpha3.ResourceSliceList
  • resource.k8s.io/v1beta1.DeviceClass
  • resource.k8s.io/v1beta1.DeviceClassList
  • resource.k8s.io/v1beta1.DeviceClassPatch
  • resource.k8s.io/v1beta1.ResourceClaim
  • resource.k8s.io/v1beta1.ResourceClaimList
  • resource.k8s.io/v1beta1.ResourceClaimPatch
  • resource.k8s.io/v1beta1.ResourceClaimTemplate
  • resource.k8s.io/v1beta1.ResourceClaimTemplateList
  • resource.k8s.io/v1beta1.ResourceClaimTemplatePatch
  • resource.k8s.io/v1beta1.ResourceSlice
  • resource.k8s.io/v1beta1.ResourceSliceList
  • resource.k8s.io/v1beta1.ResourceSlicePatch

@rquitales
Copy link
Member Author

Note: need to merge in the deleted types to support customers of older clusters.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.14%. Comparing base (cce7961) to head (cb6509b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3343   +/-   ##
=======================================
  Coverage   41.14%   41.14%           
=======================================
  Files          85       85           
  Lines       12764    12764           
=======================================
  Hits         5252     5252           
  Misses       7122     7122           
  Partials      390      390           

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

@rquitales rquitales force-pushed the rquitales/upgrade-1_32 branch from 020af31 to be4c345 Compare December 3, 2024 19:16
Copy link
Contributor

@blampe blampe left a 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
        }

provider/go.mod Outdated Show resolved Hide resolved
@rquitales rquitales force-pushed the rquitales/upgrade-1_32 branch 2 times, most recently from 4c19cff to 917d660 Compare December 6, 2024 00:59
@rquitales rquitales force-pushed the rquitales/upgrade-1_32 branch from 917d660 to cb6509b Compare December 12, 2024 01:53
@rquitales rquitales enabled auto-merge (squash) December 12, 2024 01:53
@rquitales rquitales merged commit e5d0c61 into master Dec 12, 2024
19 checks passed
@rquitales rquitales deleted the rquitales/upgrade-1_32 branch December 12, 2024 02:26
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.

Support Kubernetes v1.32 on release
2 participants