add groupsnapshot related webhooks

This commit is contained in:
Rakshith R
2023-03-29 11:27:17 +05:30
parent 50bdae2adf
commit a3cb5a927f
10 changed files with 1040 additions and 16 deletions

View File

@@ -109,7 +109,8 @@ func (a admitter) Admit(ar v1.AdmissionReview) *v1.AdmissionResponse {
}
return decideSnapshotClassV1(snapClass, oldSnapClass, a.lister)
default:
err := fmt.Errorf("expect resource to be %s, %s or %s", SnapshotV1GVR, SnapshotContentV1GVR, SnapshotClassV1GVR)
err := fmt.Errorf("expect resource to be %s, %s, or %s, but found %v",
SnapshotV1GVR, SnapshotContentV1GVR, SnapshotClassV1GVR, ar.Request.Resource)
klog.Error(err)
return toV1AdmissionResponse(err)
}