1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00
This commit is contained in:
shivkumar dudhani 2019-07-20 23:58:46 -07:00
parent b5abb4a539
commit 06691dfa2a
2 changed files with 10 additions and 2 deletions

View file

@ -24,7 +24,11 @@ func (ws *WebhookServer) HandleMutation(request *v1beta1.AdmissionRequest) *v1be
}
rname := engine.ParseNameFromObject(request.Object.Raw)
rns := engine.ParseNamespaceFromObject(request.Object.Raw)
rkind := engine.ParseKindFromObject(request.Object.Raw)
rkind := request.Kind.Kind
if rkind == "" {
//TODO TEST: just to check if we actually recieve a api-request that is blank ?
glog.Error(request)
}
var allPatches [][]byte
var annPatches []byte

View file

@ -26,7 +26,11 @@ func (ws *WebhookServer) HandleValidation(request *v1beta1.AdmissionRequest) *v1
rname := engine.ParseNameFromObject(request.Object.Raw)
rns := engine.ParseNamespaceFromObject(request.Object.Raw)
rkind := engine.ParseKindFromObject(request.Object.Raw)
rkind := request.Kind.Kind
if rkind == "" {
//TODO TEST: just to check if we actually recieve a api-request that is blank ?
glog.Error(request)
}
var annPatches []byte
for _, policy := range policies {