-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat(distribution): add network policies #302
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this PR is golden ❤️
I have some questions, on some components/rules (note: I did not try to understand all of the network policies):
- Can the ingress controller do egress everywhere? (I would like to have no blockers here to use ingress on other namespaces (or outside of the cluster))
- Can cert-manager do egress everywhere? (In case of DNS challenge, for example)
- Can external-dns do egress everywhere? (same as above)
- Can loki do egress everywhere? (for example we are using an external S3 storage)
- Can fluentd do egress everywhere? (if we install a different flow output in the cluster, for example)
- Can alert manager do egress everywhere? (It needs to connect to arbitrary endpoints to send alerts)
- Can prometheus do egress everywhere? (to scrape, but also to send metrics to a different location)
- Can mimir do egress everywhere? (to save data on S3 for example)
- Can tempo connect egress everywhere and also accept data (ingress) from everywhere?
Thank you
EDIT:
- Can pomerium connect everywhere? for example, if we want to have additional SSO ingress protected by pomerium
We can be more permissive on the traffic, so we avoid breaking stuff or forcing the creation of many network policies. |
Yes please, we need balance between security and ease of use |
Everything was changed as we agreed, including the diagrams 😄 Thanks @stefanoghinelli 💙 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
Feature: add Network Policies
With this PR we add support to Kubernetes Network Policies for OnPremise kind only.
A parameter
spec.distribution.common.networkPoliciesEnabled
has been added to enable the creation of Network Policies in core modules:By default the new field's value is
false
, so you have to explicitly set it totrue
in order to enable it.Naming convention
For each module, we create:
deny-all
policy in its target namespaceall-egress-kube-dns
in the same namespace, to allow DNS resolution with kube-dns<selected-component>-<direction>-<target-component>
.monitoring
policies because we took the official upstream ones. In this case, each component has its own policy for both ingress and egress traffic.Examples
To allow traffic in egress from pomerium to grafana, the policy name is
pomerium-egress-grafana
.To allow traffic in ingress from fluentbit to fluentd, the policy name is
fluentd-ingress-fluentbit
## Testing
We have tested these scenarios with
fury distribution 1.29.4 - furyctl 0.29.10
:Ingress: Single | Dual | None
Monitoring: Prometheus | Mimir
Networking: Calico | Cilium
Logging: Loki | Opensearch (Single and Triple)
Auth: SSO | Basic Auth | None
OPA: Gatekeeper | Kyverno
Tracing
DR
We have also tested the following migrations:
To do after the new modules' versions are released
fury-distribution
andfuryctl
versionsjobs-egress-opensearch
andopensearch-ingress-jobs
to match the new labels, introduced inlogging v4.0.0