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: add cluster resource override validation webhook configuration #721

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

britaniar
Copy link
Contributor

@britaniar britaniar commented Mar 14, 2024

Description of your changes

Fixes #

I have: added webhook configuration for ClusterResourceOverride

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

How has this code been tested

Special notes for your reviewer

@zhiying-lin
Copy link
Contributor

zhiying-lin commented Mar 14, 2024

we don't need to create a separate validation webhook func. it can be part of the existing buildFleetValidatingWebhooks(). You can refer to how we validate member cluster CR. https://github.com/Azure/fleet/blob/main/pkg/webhook/webhook.go#L294

https://github.com/Azure/fleet/blob/main/pkg/webhook/membercluster/membercluster_validating_webhook.go

The core func is in the https://github.com/Azure/fleet/blob/main/pkg/utils/validator/membercluster.go#L19.

Can you create the first PR to implement such util for the override first?

@britaniar britaniar force-pushed the overrideValidationWebhook branch 2 times, most recently from abcf286 to 63da312 Compare March 14, 2024 17:06
@britaniar britaniar changed the title feat: add override validation webhook feat: add override validation webhook configuration Mar 18, 2024
@britaniar britaniar changed the title feat: add override validation webhook configuration feat: add cluster resource override validation webhook configuration Mar 20, 2024
@britaniar britaniar force-pushed the overrideValidationWebhook branch from 82d0e14 to 3443991 Compare March 20, 2024 20:59
Copy link

There was an error handling pipeline event e4b3bca9-4737-4952-9b85-6192f019c61a.

@britaniar britaniar marked this pull request as ready for review March 26, 2024 18:44
@britaniar britaniar force-pushed the overrideValidationWebhook branch from 1daba13 to 29517be Compare March 27, 2024 02:48
@britaniar britaniar force-pushed the overrideValidationWebhook branch from 29517be to 755feb6 Compare March 27, 2024 02:50
pkg/webhook/webhook.go Outdated Show resolved Hide resolved
pkg/webhook/webhook.go Outdated Show resolved Hide resolved
@britaniar britaniar merged commit 981ca5e into Azure:main Mar 28, 2024
11 checks passed
@britaniar britaniar deleted the overrideValidationWebhook branch March 28, 2024 16:54
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