-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documented tenantPolicies.network.disableIntraTenantNetworking (#191)
Co-authored-by: Karl Johan Grahn <[email protected]>
- Loading branch information
1 parent
46680fc
commit c5ab886
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Networking tenant policies | ||
|
||
The networking tenant policies limit how tenants can communicate with each other. | ||
|
||
## Disable intra-tenant networking | ||
|
||
```yaml title="Integration Configuration" | ||
apiVersion: v1beta1 | ||
kind: integrationconfigs.tenantoperator.stakater.com | ||
spec: | ||
# other fields... | ||
tenantPolicies: | ||
network: | ||
disableIntraTenantNetworking: true | ||
``` | ||
The flag works by deploying a set of `NetworPolicies` for each tenant which filters incoming traffic coming from another tenants namespace. It allows all other traffic. | ||
|
||
The `NetworkPolicy` is as follows: | ||
|
||
```yaml | ||
apiVersion: networking.k8s.io/v1 | ||
kind: NetworkPolicy | ||
metadata: | ||
name: disable-intra-tenant-networking-${tenant} # tenant will be substituted for the tenant-name | ||
namespace: test # Will be deployed to all the tenants namespaces | ||
spec: | ||
podSelector: {} # The rule selects all pods | ||
policyTypes: | ||
- Ingress # We only filter incoming traffic | ||
ingress: | ||
- from: | ||
- namespaceSelector: | ||
matchExpressions: | ||
- key: stakater.com/tenant | ||
operator: DoesNotExist | ||
- namespaceSelector: | ||
matchLabels: | ||
stakater.com/tenant: ${tenant} | ||
``` | ||
|
||
### Demo | ||
|
||
![Disable intra-tenant networking demo](../../images/disableIntraTenantNetworkingDemo.gif) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.