1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-30 19:35:06 +00:00

[Bug] Fix nil-dereference in pss validation (#8271)

Signed-off-by: AdamKorcz <adam@adalogics.com>
This commit is contained in:
AdamKorcz 2023-09-05 19:45:07 +01:00 committed by GitHub
parent d61e0515c2
commit 34bfb57c08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,6 +110,8 @@ func getSpec(resource unstructured.Unstructured) (podSpec *corev1.PodSpec, metad
podSpec = &pod.Spec
metadata = &pod.ObjectMeta
return podSpec, metadata, nil
} else {
return nil, nil, fmt.Errorf("Could not find correct resource type")
}
if err != nil {
return nil, nil, err