Panic on nil pointer dereference
kirillmakhonin-brt opened this issue · 2 comments
kirillmakhonin-brt commented
Hello
We've tried to use annotations proxy-pod-scheduling-constraints
/use-constraints-from-spec-for-proxy-pod-scheduling
on the latest version and 've recevied this error
2023/09/06 17:29:58 http: panic serving 10.64.18.99:57152: runtime error: invalid memory address or nil pointer dereference
goroutine 3623240 [running]:
net/http.(*conn).serve.func1()
net/http/server.go:1802 +0xb9
panic({0x1818520, 0x2a70bf0})
runtime/panic.go:1047 +0x266
admiralty.io/multicluster-scheduler/pkg/webhooks/proxypod.mutator.mutate({0xc00202d800}, 0xc000df4400)
admiralty.io/multicluster-scheduler/pkg/webhooks/proxypod/proxypod.go:133 +0x48d
We suspect that issue is in the code that tries to access srcPod.Spec
as Spec
may be empty in corner cases
adrienjt commented
Hi, Spec isn't a pointer, so that's no it. However, srcPod may be nil. I'll have a look.