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

Drop Kubernetes v1.26, and support Kubernetes v1.29 #2308

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

tenzen-y
Copy link
Member

What this PR does / why we need it:
I updated supporting Kubernetes versions.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #2256

Checklist:

  • Docs included if any changes are user facing

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenzen-y

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Comment on lines -121 to -124
// TODO: Once the below issue is resolved, we need to switch discovery-client to the built-in one.
// https://github.com/kubernetes-sigs/controller-runtime/issues/2354
// https://github.com/kubernetes-sigs/controller-runtime/issues/2424
MapperProvider: apiutil.NewDiscoveryRESTMapper,
Copy link
Member Author

Choose a reason for hiding this comment

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

This issue is resolved in the controller-runtime v0.17.

Resources: corev1.ResourceRequirements{
Resources: corev1.VolumeResourceRequirements{
Copy link
Member Author

Choose a reason for hiding this comment

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

Dedicated API is introduced into the PVC: kubernetes/kubernetes#118653

Comment on lines 222 to 248
type ssaPatchAsStrategicMerge struct {
client.Patch
}

func (*ssaPatchAsStrategicMerge) Type() types.PatchType {
return types.StrategicMergePatchType
}

func wrapSSAPatch(patch client.Patch) client.Patch {
if patch.Type() == types.ApplyPatchType {
return &ssaPatchAsStrategicMerge{Patch: patch}
}
return patch
}

// ssaAsStrategicMergePatchFunc returns the patch interceptor.
// TODO (tenzen-y): Once the fake client supports server-side apply, we should remove these interceptor.
// REF: https://github.com/kubernetes/kubernetes/issues/115598
func ssaAsStrategicMergePatchFunc(
ctx context.Context,
cli client.WithWatch,
obj client.Object,
patch client.Patch,
opts ...client.PatchOption,
) error {
return cli.Patch(ctx, obj, wrapSSAPatch(patch), opts...)
}
Copy link
Member Author

Choose a reason for hiding this comment

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

As I described in the comments, we need to keep this interceptor until the fake client supports SSA since the certgenerator uses the SSA here:

Copy link
Member

Choose a reason for hiding this comment

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

Great, thanks for finding this!

@tenzen-y
Copy link
Member Author

/assign @andreyvelich @johnugeorge

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thanks for the update @tenzen-y!
I am wondering if we should also update the Kubernetes Python Client in SDK: https://github.com/kubeflow/katib/blob/master/sdk/python/v1beta1/setup.py#L24
My suggestion is to use the earliest K8s version that we support: 1.27 with the latest stable release of this version from Python Client: e.g. 27.2: https://github.com/kubernetes-client/python/releases/tag/v27.2.0
Thoughts @kubeflow/wg-training-leads @droctothorpe ?

Comment on lines 222 to 248
type ssaPatchAsStrategicMerge struct {
client.Patch
}

func (*ssaPatchAsStrategicMerge) Type() types.PatchType {
return types.StrategicMergePatchType
}

func wrapSSAPatch(patch client.Patch) client.Patch {
if patch.Type() == types.ApplyPatchType {
return &ssaPatchAsStrategicMerge{Patch: patch}
}
return patch
}

// ssaAsStrategicMergePatchFunc returns the patch interceptor.
// TODO (tenzen-y): Once the fake client supports server-side apply, we should remove these interceptor.
// REF: https://github.com/kubernetes/kubernetes/issues/115598
func ssaAsStrategicMergePatchFunc(
ctx context.Context,
cli client.WithWatch,
obj client.Object,
patch client.Patch,
opts ...client.PatchOption,
) error {
return cli.Patch(ctx, obj, wrapSSAPatch(patch), opts...)
}
Copy link
Member

Choose a reason for hiding this comment

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

Great, thanks for finding this!

@tenzen-y
Copy link
Member Author

Thanks for the update @tenzen-y! I am wondering if we should also update the Kubernetes Python Client in SDK: https://github.com/kubeflow/katib/blob/master/sdk/python/v1beta1/setup.py#L24 My suggestion is to use the earliest K8s version that we support: 1.27 with the latest stable release of this version from Python Client: e.g. 27.2: https://github.com/kubernetes-client/python/releases/tag/v27.2.0 Thoughts @kubeflow/wg-training-leads @droctothorpe ?

+1
I will wait for other's thoughts until Friday.

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@tenzen-y
Copy link
Member Author

Thanks for the update @tenzen-y! I am wondering if we should also update the Kubernetes Python Client in SDK: https://github.com/kubeflow/katib/blob/master/sdk/python/v1beta1/setup.py#L24 My suggestion is to use the earliest K8s version that we support: 1.27 with the latest stable release of this version from Python Client: e.g. 27.2: https://github.com/kubernetes-client/python/releases/tag/v27.2.0 Thoughts @kubeflow/wg-training-leads @droctothorpe ?

+1 I will wait for other's thoughts until Friday.

I updated the required Kubernetes version for the Python client as well since we don't have any objections.

@tenzen-y
Copy link
Member Author

@andreyvelich Could you take another look?

@andreyvelich
Copy link
Member

Thanks for the update @tenzen-y!
Please can you update Kubernetes SDK version for Training Operator as well: https://github.com/kubeflow/training-operator/blob/master/sdk/python/setup.py#L30 ?

@andreyvelich
Copy link
Member

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Apr 15, 2024
@google-oss-prow google-oss-prow bot merged commit 025ce25 into kubeflow:master Apr 15, 2024
60 checks passed
@tenzen-y tenzen-y deleted the support-1.29-drop-1.26 branch April 15, 2024 11:09
@tenzen-y
Copy link
Member Author

Thanks for the update @tenzen-y! Please can you update Kubernetes SDK version for Training Operator as well: https://github.com/kubeflow/training-operator/blob/master/sdk/python/setup.py#L30 ?

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Kubernetes v1.27 - v1.29
3 participants