-
Notifications
You must be signed in to change notification settings - Fork 905
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
pkg/webhook: bind Multi-Cluster Ingress validation functions to ValidationAdmission
struct
#5520
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e24f6d0
to
8cab55c
Compare
In this commit, we bind the validation functions of `MultiClusterIngress` webhook i.e `validateMCIUpdate` and `validateMCI` functions to `ValidatingAdmission` struct using pointer receivers. Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
8cab55c
to
48c034c
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5520 +/- ##
==========================================
+ Coverage 31.70% 32.45% +0.74%
==========================================
Files 643 643
Lines 44445 44497 +52
==========================================
+ Hits 14090 14440 +350
+ Misses 29325 28961 -364
- Partials 1030 1096 +66
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
After reflecting on this PR, I think it is subjective and does not necessarily enhance maintainability or consistency. As I review the repository, I notice a mix of both approaches. What do you think? |
You mean this change is not necessary, right? |
Yes. I'd also like to hear your thoughts on it? |
Why do you say that? Can you give some reason? |
Sorry for removing it I thought it would cause confusion. the reason in the Motivation and Context: |
After reading, the current modification is of little significance. At least for now, I have not seen any improvement in maintainability. If there are great benefits in the future, let's continue the improvement. Do you think it's okay? @mohamedawnallah |
Yes I'm okay with that. Let's close this PR and remove the dependency that this PR #5518 depends on 👍 |
Description
In this commit, we bind the validation functions of
MultiClusterIngress
webhook i.evalidateMCIUpdate
andvalidateMCI
functions toValidatingAdmission
struct using pointer receivers.Motivation and Context
While testing the multi-cluster ingress webhook (#5518), I identified an opportunity to improve consistency and maintainability by aligning the validation methods in Multi-Cluster Ingress with the pattern used in pkg/webhook/multiclusterservice, leading to this submission.
What type of PR is this?
/kind cleanup
Does this PR introduce a user-facing change?: