Skip to content

add admission webhook validation for service export request#358

Open
olamilekan000 wants to merge 1 commit into
kbind-dev:mainfrom
olamilekan000:move-serviceexportrequest-validation-to-webhook
Open

add admission webhook validation for service export request#358
olamilekan000 wants to merge 1 commit into
kbind-dev:mainfrom
olamilekan000:move-serviceexportrequest-validation-to-webhook

Conversation

@olamilekan000

Copy link
Copy Markdown
Contributor

Summary

change moves validatiion logic for  APIServiceExportRequest to validation webhook

What Type of PR Is This?

/kind feature

Related Issue(s)

Fixes 325

Release Notes

add admission webhook validation for service export request

@olamilekan000 olamilekan000 requested a review from a team as a code owner November 4, 2025 03:24
@coderabbitai

coderabbitai Bot commented Nov 4, 2025

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-code-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@olamilekan000 olamilekan000 force-pushed the move-serviceexportrequest-validation-to-webhook branch 2 times, most recently from d4a7cf9 to 4f00794 Compare November 5, 2025 21:57
@mjudeikis

Copy link
Copy Markdown
Contributor

@olamilekan000 will review this bit later. Need few days to sort some other things. Have you been able to test this while deploying kube-bind backend and trying it?

@olamilekan000

Copy link
Copy Markdown
Contributor Author

@olamilekan000 will review this bit later. Need few days to sort some other things. Have you been able to test this while deploying kube-bind backend and trying it?

No problem. Yes I did. Here's a screenshot

Screenshot 2025-11-06 at 12 22 49

@olamilekan000 olamilekan000 force-pushed the move-serviceexportrequest-validation-to-webhook branch 4 times, most recently from e5f053a to 3a2cbbf Compare November 6, 2025 11:56
Comment thread backend/admission/apiserviceexportrequest_validator.go Outdated
@olamilekan000 olamilekan000 force-pushed the move-serviceexportrequest-validation-to-webhook branch 2 times, most recently from 793f1ed to 2365f57 Compare November 19, 2025 10:01
coderabbitai[bot]
coderabbitai Bot previously approved these changes Nov 19, 2025
@olamilekan000 olamilekan000 force-pushed the move-serviceexportrequest-validation-to-webhook branch 3 times, most recently from 4142391 to 4ce46f7 Compare November 19, 2025 16:45
Signed-off-by: olalekan odukoya <odukoyaonline@gmail.com>
@olamilekan000 olamilekan000 force-pushed the move-serviceexportrequest-validation-to-webhook branch from 4ce46f7 to 55683d7 Compare November 19, 2025 17:19
@olamilekan000

Copy link
Copy Markdown
Contributor Author

I almost forgot about this PR. In line with @xrstf's Tedtalk, I realize that the current PR implementation goes against the point he has raised, which I agree with. To correct this, should the PR pivot to:

  • Use CEL for stateless structural validation within the CRD (This will solve the issue with generating certificates)?
  • Move the referential validation (checking against BoundSchemas) into the Reconciler, allowing the object to be created but marking it as 'Invalid/Pending' in the status? (If you have a better suggestion, I don't mind)"

cc @mjudeikis @cnvergence

@mjudeikis

Copy link
Copy Markdown
Contributor

make sense :) +1 on stateless

@cnvergence

Copy link
Copy Markdown
Member

yeah, CEL seems right for it
thanks

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.

Move validation to admission

4 participants