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:
parent
d61e0515c2
commit
34bfb57c08
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue