UpdateMutatingWebhookConf update MutatingWebhookConfiguration object
( ctx context.Context, kubeInterface kubernetes.Interface, wh *admissionregistrationv1.MutatingWebhookConfiguration, )
| 65 | |
| 66 | // UpdateMutatingWebhookConf update MutatingWebhookConfiguration object |
| 67 | func UpdateMutatingWebhookConf( |
| 68 | ctx context.Context, |
| 69 | kubeInterface kubernetes.Interface, |
| 70 | wh *admissionregistrationv1.MutatingWebhookConfiguration, |
| 71 | ) error { |
| 72 | _, err := kubeInterface.AdmissionregistrationV1(). |
| 73 | MutatingWebhookConfigurations().Update(ctx, wh, metav1.UpdateOptions{}) |
| 74 | if err != nil { |
| 75 | return err |
| 76 | } |
| 77 | return nil |
| 78 | } |
| 79 | |
| 80 | // getCNPGsValidatingWebhookConf get the ValidatingWebhook linked to the operator. |
| 81 | // The lookup name is resolved from configuration.Current, which reads the test |