protoactor-go
protoactor-go copied to clipboard
K8s Provider uses a context deadline with 0 second timeout
Describe the bug When using k8s cluster provider the registration of the member times out due to a context deadline being set to 0. Seems like it cause by the monitor actor using ReceiveTimeout to get the timeout. ReceiveTimeout is never set for the actor.
https://github.com/asynkron/protoactor-go/blob/dev/cluster/clusterproviders/k8s/k8s_cluster_monitor.go#L21
To Reproduce
- Setup a pod with the correct roles to access kubernetes APIs
- Use k8s provider when configuring the cluster
- Logs are flooded with
10:42:55 ERROR [CLUSTER] [KUBERNETES] Failed to register service to k8s, will retry error="unable to get own pod information for example-54f696bc49-r9npg: context deadline exceeded
I added some debug logs and its indeed caused by the linked line.
Expected behavior Member is registered correctly.
Thanks for the detailed information, will take a look when I am back