@@ -49,6 +49,11 @@ type WebhookInstallOptions struct {
49
49
// ValidatingWebhooks is a list of ValidatingWebhookConfigurations to install
50
50
ValidatingWebhooks []* admissionv1.ValidatingWebhookConfiguration
51
51
52
+ // IgnoreSchemeConvertible, will modify any CRD conversion webhook to use the local serving host and port,
53
+ // bypassing the need to have the types registered in the Scheme. This is useful for testing CRD conversion webhooks
54
+ // with unregistered or unstructured types.
55
+ IgnoreSchemeConvertible bool
56
+
52
57
// IgnoreErrorIfPathMissing will ignore an error if a DirectoryPath does not exist when set to true
53
58
IgnoreErrorIfPathMissing bool
54
59
@@ -184,7 +189,8 @@ func defaultWebhookOptions(o *WebhookInstallOptions) {
184
189
func WaitForWebhooks (config * rest.Config ,
185
190
mutatingWebhooks []* admissionv1.MutatingWebhookConfiguration ,
186
191
validatingWebhooks []* admissionv1.ValidatingWebhookConfiguration ,
187
- options WebhookInstallOptions ) error {
192
+ options WebhookInstallOptions ,
193
+ ) error {
188
194
waitingFor := map [schema.GroupVersionKind ]* sets.Set [string ]{}
189
195
190
196
for _ , hook := range mutatingWebhooks {
@@ -242,7 +248,7 @@ func (p *webhookPoller) poll(ctx context.Context) (done bool, err error) {
242
248
continue
243
249
}
244
250
for _ , name := range names .UnsortedList () {
245
- var obj = & unstructured.Unstructured {}
251
+ obj : = & unstructured.Unstructured {}
246
252
obj .SetGroupVersionKind (gvk )
247
253
err := c .Get (context .Background (), client.ObjectKey {
248
254
Namespace : "" ,
0 commit comments