Skip to content

Commit 24fb510

Browse files
committed
feat: Skip preflight on Cluster update
This is defensive programming. The webhook is already configured to only run on create. When we support for update, we will remove this, and reconfigure the webhook.
1 parent 55b89ae commit 24fb510

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/webhook/preflight/preflight.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ func (h *WebhookHandler) Handle(ctx context.Context, req admission.Request) admi
8484
return admission.Allowed("")
8585
}
8686

87+
if req.Operation == admissionv1.Update {
88+
return admission.Allowed("")
89+
}
90+
8791
cluster := &clusterv1.Cluster{}
8892
err := h.decoder.Decode(req, cluster)
8993
if err != nil {

0 commit comments

Comments
 (0)