MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / UpdateMutatingWebhookConf

Function UpdateMutatingWebhookConf

tests/utils/operator/webhooks.go:67–78  ·  view source on GitHub ↗

UpdateMutatingWebhookConf update MutatingWebhookConfiguration object

(
	ctx context.Context,
	kubeInterface kubernetes.Interface,
	wh *admissionregistrationv1.MutatingWebhookConfiguration,
)

Source from the content-addressed store, hash-verified

65
66// UpdateMutatingWebhookConf update MutatingWebhookConfiguration object
67func 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

Callers 2

webhook_test.goFile · 0.92
AssertWebhookEnabledFunction · 0.92

Calls 1

UpdateMethod · 0.45

Tested by 1

AssertWebhookEnabledFunction · 0.74