-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Race condition can leads to egress connectivity #83
Comments
Yes, |
Ok. The default behavior is allow (default Kubernetes behavior) until the policy endpoints are reconciled i.e, the controller should identify the pods for the network policy and send the update downstream to the node agent to enforce the policy. We are exploring strict mode option to have default block/deny until policy endpoints reconcile - Ref - aws/containers-roadmap#1478 (comment) |
It also mean that if the node is under cpu pressure, it can take more than 2 sec to enforce security policies. |
@XciD have you tried less than 2 seconds sleep or is the reconciliation consistently taking around 2 seconds? |
I've tried with 1s but my e2e test fail. This code with our calico + aws cni fails immediatly
With the new cluster, without sleep or sleep < 2 before the request, it fails |
Got the same issue, would be great to implement a strict mode that would force pod to wait until the network policy agent configures well the pod ! |
Strict mode implementation is still in progress. Will provide an update on this ticket when PRs are available |
I’m not sure strict mode would be the solution here has it would still take some time for the reconciliation to happened. What about introducing podreadinessgate that would flag pod ready only when the netpol reconciliation has happened ? |
@allamand that is what strict mode does. The pod is not marked as Ready until Network Policies have been applied and properly reconciled. |
@jdn5126 ok this is nice, thanks. Any ETA to share ? |
#209 is the PR, and there are some accompanying VPC CNI changes in aws/amazon-vpc-cni-k8s#2790, but I am not sure what the ETA is. I think sometime in Q2 |
Strict mode is now available. Let us know if that helps with the above use case/issue.. |
@XciD Were you able to fix the issue with strict mode ? |
@XciD Closing this issue as strict mode is available. If you are still seeing any issues please open a new issue |
We are testing the new features provided by this agent on one of our cluster (recently updated to 1.28).
We saw, that the pod connectivity is not fully ensure when a pod starts.
For example, this simple Pod will print:
If you wait a little before making the call, it's correctly bloqued.
You can see that on pod restart, policy works too.
The text was updated successfully, but these errors were encountered: