Catch invalid conversion of k8s 1.7 policies #152
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We're not handling policies received from k8s 1.7 properly at the moment. Namely, those policies don't have a
polciyTypes
field which means libcalico defaults them toIngress/Egress
.The k8s backend really should be catching this and including
Ingress
since k8s 1.7 networkpolicies only affect ingress.This is just a UT, the fix is in libcalico I think.
This PR also includes some cleaning up of the Context/It/By decorator usage.
CC @tmjd I think this is the failure you're hitting and what's causing the e2e failures.
Todos
Release Note