Skip to content

Commit

Permalink
Support Create & Update operations in admission webhook (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Jan 28, 2018
1 parent 2af05cc commit 0dee801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/admission/plugin/admission.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (a *AdmissionHook) Validate(req *admission.AdmissionRequest) *admission.Adm
status := &admission.AdmissionResponse{}
supportedKinds := sets.NewString(api.ResourceKindRestic, api.ResourceKindRecovery)

if req.Operation != admission.Create ||
if (req.Operation != admission.Create && req.Operation != admission.Update) ||
len(req.SubResource) != 0 ||
req.Kind.Group != api.SchemeGroupVersion.Group ||
!supportedKinds.Has(req.Kind.Kind) {
Expand Down

0 comments on commit 0dee801

Please sign in to comment.