-
Notifications
You must be signed in to change notification settings - Fork 670
weave-npc: error: assignment to entry in nil map #3407
Comments
thanks @kirikaza for reporting the issue. Looks like inner map in selector set is not getting initialised in some cases. targetSelectorsCount: make(map[string]map[policyType]int)} Could you please share the network polices you have used? In the policy spec was |
|
@kirikaza Thanks for the bug report. The crash happens because of the invalid
According to https://kubernetes.io/docs/concepts/services-networking/network-policies/:
seems to be a bug in Kubernetes as it had to set To prevent from this happening, you should set |
On recent version of kubernetes (1.14) I see PolicyType is set appropriately for the network policy
Closing this issue. |
BUG REPORT
What you expected to happen?
weave-npc logs shouldn't contain errors
What happened?
How to reproduce it?
I couldn't reproduce it again. First time I played with network policies, creating and deleting them. These policies were simple: "deny all ingress", "deny all egress", "allow ingress to A from B", "allow egress from B to A".
Anything else we need to know?
Versions:
minikube cluster has been created according to this note.
Logs:
$ kubectl logs -n kube-system weave-net-… weave-npc
— see the gist.The text was updated successfully, but these errors were encountered: