Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit e6946d0

Browse files
authored
Merge pull request #917 from adrianludwin/unbreak-114-051
Unbreak object validator on 1.14
2 parents 78ecff5 + 162841f commit e6946d0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

incubator/hnc/internal/validators/object.go

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ func (o *Object) Handle(ctx context.Context, req admission.Request) admission.Re
7070
}
7171
}
7272
if req.Operation != admissionv1beta1.Create {
73+
// See issue #688 and #889
74+
if req.Operation == admissionv1beta1.Delete && req.OldObject.Raw == nil {
75+
return allow("cannot validate deletions in K8s 1.14")
76+
}
7377
if err := o.decoder.DecodeRaw(req.OldObject, oldInst); err != nil {
7478
log.Error(err, "Couldn't decode req.OldObject", "raw", req.OldObject)
7579
return deny(metav1.StatusReasonBadRequest, err.Error())

0 commit comments

Comments
 (0)