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

feat: v1beta1 IMC, Work guard rail #572

Merged
merged 3 commits into from
Oct 20, 2023

Conversation

Arvindthiru
Copy link
Contributor

@Arvindthiru Arvindthiru commented Oct 19, 2023

Description of your changes

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

@Arvindthiru Arvindthiru changed the title feat: v1beta1 IMC guard rail feat: v1beta1 IMC, Work guard rail Oct 19, 2023
@Arvindthiru Arvindthiru marked this pull request as ready for review October 20, 2023 01:30
pkg/webhook/validation/uservalidation.go Outdated Show resolved Hide resolved
response = v.handleFleetMemberNamespacedResource(ctx, req)
case req.Kind == eventGVK:
klog.V(2).InfoS("handling event resource", "GVK", eventGVK, "namespacedName", namespacedName, "operation", req.Operation, "subResource", req.SubResource)
response = v.handleEvent(ctx, req)
case req.Namespace != "":
klog.V(2).InfoS(fmt.Sprintf("handling %s resource", req.Kind.Kind), "GVK", req.Kind, "namespacedName", namespacedName, "operation", req.Operation, "subResource", req.SubResource)
klog.V(2).InfoS(fmt.Sprintf(handleResourceFmt, req.RequestKind.Kind), "GVK", req.RequestKind, "namespacedName", namespacedName, "operation", req.Operation, "subResource", req.SubResource)
Copy link
Contributor

Choose a reason for hiding this comment

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

why use requestKind instead of Kind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

RequestKind is the kind associated to the object in the original request, since it the source truth decided to use that
image

Copy link
Contributor

Choose a reason for hiding this comment

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

how is it printed?

Copy link
Contributor Author

@Arvindthiru Arvindthiru Oct 20, 2023

Choose a reason for hiding this comment

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

RequestKind and Kind both use metav1.GroupVersionKind
image

@ryanzhang-oss ryanzhang-oss merged commit 2cb637a into Azure:main Oct 20, 2023
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