added interface conversion check (#318)

This commit is contained in:
RoyUP9 2021-10-06 13:38:32 +03:00 committed by GitHub
parent 9c98a4c2b1
commit 111d000c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,10 @@ func FilteredWatch(ctx context.Context, kubernetesProvider *Provider, targetName
return return
} }
pod := e.Object.(*corev1.Pod) pod, ok := e.Object.(*corev1.Pod)
if !ok {
continue
}
if !podFilter.MatchString(pod.Name) { if !podFilter.MatchString(pod.Name) {
continue continue