| 117 | } |
| 118 | |
| 119 | func getMutatingWebhook(ctx context.Context, c client.Client, mutatingWebhookCfg *admregv1.MutatingWebhookConfiguration) (*admregv1.MutatingWebhookConfiguration, error) { |
| 120 | existingCfg := &admregv1.MutatingWebhookConfiguration{} |
| 121 | err := c.Get(ctx, types.NamespacedName{ |
| 122 | Name: mutatingWebhookCfg.Name, |
| 123 | Namespace: mutatingWebhookCfg.Namespace, |
| 124 | }, existingCfg) |
| 125 | return existingCfg, err |
| 126 | } |
| 127 | |
| 128 | func getValidateWebhook(ctx context.Context, c client.Client, validateWebhookCfg *admregv1.ValidatingWebhookConfiguration) (*admregv1.ValidatingWebhookConfiguration, error) { |
| 129 | existingCfg := &admregv1.ValidatingWebhookConfiguration{} |