Skip to content

Conversation

@weng271190436
Copy link
Collaborator

Description of your changes

remove v1alpha1 CRP and MC validation

Fixes #

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Special notes for your reviewer

Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...eetresourcehandler/fleetresourcehandler_webhook.go 33.33% 2 Missing ⚠️
pkg/webhook/webhook.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@weng271190436 weng271190436 changed the title chore: remove v1alpha1 CRP and MC validation chore: 1 - remove v1alpha1 CRP and MC validation Oct 24, 2025
// TODO: remove after we remove v1alpha1 support
// disable v1alpha1 related resources by default
r.AddGroup(fleetv1alpha1.GroupVersion.Group)
r.AddGroupVersionKind(WorkV1Alpha1GVK)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume this can be removed too?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you want to do it in another PR, pls add a TODO comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a TODO comment. In fact I already have my next PR stacking on top of this one which is dedicated to removing v1alpha1work

#303

Version: fleetv1alpha1.GroupVersion.Version,
Resource: fleetv1alpha1.MemberClusterResource,
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

What about workV1alpha1 resources below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a TODO comment. In fact I already have my next PR stacking on top of this one which is dedicated to removing v1alpha1work

#303

klog.V(2).InfoS("handling namespace resource", "name", req.Name, "operation", req.Operation, "subResource", req.SubResource)
response = v.handleNamespace(req)
case req.Kind == utils.IMCV1Alpha1MetaGVK || req.Kind == utils.WorkV1Alpha1MetaGVK || req.Kind == utils.IMCMetaGVK || req.Kind == utils.WorkMetaGVK || req.Kind == utils.EndpointSliceExportMetaGVK || req.Kind == utils.EndpointSliceImportMetaGVK || req.Kind == utils.InternalServiceExportMetaGVK || req.Kind == utils.InternalServiceImportMetaGVK:
case req.Kind == utils.WorkV1Alpha1MetaGVK || req.Kind == utils.IMCMetaGVK || req.Kind == utils.WorkMetaGVK || req.Kind == utils.EndpointSliceExportMetaGVK || req.Kind == utils.EndpointSliceImportMetaGVK || req.Kind == utils.InternalServiceExportMetaGVK || req.Kind == utils.InternalServiceImportMetaGVK:
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto, WorkV1apha1 is another v1alpha1 API that we'd like to remove. Do you want to do it in another PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a TODO comment. In fact I already have my next PR stacking on top of this one which is dedicated to removing v1alpha1work

#303

Signed-off-by: Wei Weng <Wei.Weng@microsoft.com>
@weng271190436 weng271190436 merged commit 3510abe into kubefleet-dev:main Oct 28, 2025
19 of 21 checks passed
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.

2 participants