-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add default kubernetes network policy support #2536
Conversation
I think we also need to allow traffic from all monitoring namespaces? (not exactly sure how we could select them, but at least |
edit: we now simply disallow traffic between Lagoon environment namespaces. Other namespaces are not affected. |
2c2b303
to
c566e79
Compare
38804c3
to
66d43a8
Compare
These feature flags integrate with these Lagoon PRs: * uselagoon/lagoon#2523 * uselagoon/lagoon#2536
These feature flags integrate with these Lagoon PRs: * uselagoon/lagoon#2523 * uselagoon/lagoon#2536
These feature flags integrate with these Lagoon PRs: * uselagoon/lagoon#2523 * uselagoon/lagoon#2536
This function extracts feature flag variables from either the build environment, or the Lagoon project/environment env-vars.
508799d
to
6ba9d45
Compare
6178720
to
5e7fd47
Compare
Confirmed working in local branch.
Have also pushed a testing/network-policies branch with Calico CNI enabled for local/CI testing. Test to be developed. |
Checklist
This PR adds a network policy which is applied to Lagoon environment namespaces. It is disabled by default and controlled via a feature flag as documented in #2541.
The default policy currently implements namespace isolation by filtering Ingress traffic. Egress traffic is not filtered.
Because Egress traffic is not filtered, internal cluster services can still be consumed by Lagoon project workloads with this network policy applied. This is required for logging to
application-logs.lagoon.svc
, and is also common in dedicated Lagoon clusters (e.g. shared Elasticsearch).Network policies only affects internal cluster traffic. Traffic which routes between Lagoon projects via a public URL (e.g. via an ingress) is not affected. This is the case with e.g. decoupled projects where a frontend consumes a backend API via a public URL.
Similarly to #2481, this depends on uselagoon/lagoon-charts#235. Once that lands, we can remove 83be81f from this PR.
Closing issues
n/a