Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #917 from adrianludwin/unbreak-114-051
Browse files Browse the repository at this point in the history
Unbreak object validator on 1.14
  • Loading branch information
k8s-ci-robot committed Jul 23, 2020
2 parents 78ecff5 + 162841f commit e6946d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions incubator/hnc/internal/validators/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ func (o *Object) Handle(ctx context.Context, req admission.Request) admission.Re
}
}
if req.Operation != admissionv1beta1.Create {
// See issue #688 and #889
if req.Operation == admissionv1beta1.Delete && req.OldObject.Raw == nil {
return allow("cannot validate deletions in K8s 1.14")
}
if err := o.decoder.DecodeRaw(req.OldObject, oldInst); err != nil {
log.Error(err, "Couldn't decode req.OldObject", "raw", req.OldObject)
return deny(metav1.StatusReasonBadRequest, err.Error())
Expand Down

0 comments on commit e6946d0

Please sign in to comment.