Skip to content

Commit 05531bb

Browse files
committed
Always render latest Service Object, not oldObject (OSD-21590)
1 parent 31ecebd commit 05531bb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/webhooks/service/service.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,7 @@ func (s *ServiceWebhook) renderService(req admissionctl.Request) (*corev1.Servic
151151
}
152152
service := &corev1.Service{}
153153

154-
if len(req.OldObject.Raw) > 0 {
155-
err = decoder.DecodeRaw(req.OldObject, service)
156-
} else {
157-
err = decoder.Decode(req, service)
158-
}
154+
err = decoder.Decode(req, service)
159155
if err != nil {
160156
return nil, err
161157
}

0 commit comments

Comments
 (0)