Skip to content

Conversation

@reshnm
Copy link
Contributor

@reshnm reshnm commented Nov 10, 2025

What this PR does / why we need it:

The installment of validatingwebhookconfigurations and mutatingwebhookconfigurations was no longer working for some of our types because they are no longer implementing the CustomValidator or CustomDefaulter. Therefore the type check is no longer working when deciding wether the configuration shall be applied.

The interface now uses a more explicit configuration type

// APITypes defines an API type along with whether it has a validator and/or defaulter webhook.
type APITypes struct {
	// Obj is the API type object.
	Obj client.Object
	// Validator indicates whether the type has a validating webhook.
	Validator bool
	// Defaulter indicates whether the type has a mutating webhook.
	Defaulter bool
}

This type can be configured directly to the users needs without the need for the client.Object concrete type to implement
CustomValidator and/or CustomDefaulter.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Make webhook install configuration types more explicit

@reshnm reshnm merged commit 777ed92 into main Nov 11, 2025
7 checks passed
@reshnm reshnm deleted the fix/webhooks-install-uninstall branch November 11, 2025 07:48
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.

3 participants