From 9c97e5a1a8a6241923a8a47f4de87b03212e5b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Luk=C5=A1a?= Date: Tue, 26 Nov 2024 16:33:54 +0100 Subject: [PATCH 1/2] Add documentation for running multiple meshes on a single cluster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marko Lukša --- docs/README.md | 252 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) diff --git a/docs/README.md b/docs/README.md index 136954d3c..b1fa981a8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -20,6 +20,14 @@ - [Example using the InPlace strategy](#example-using-the-inplace-strategy) - [RevisionBased](#revisionbased) - [Example using the RevisionBased strategy](#example-using-the-revisionbased-strategy) +- [Multiple meshes on a single cluster](#multiple-meshes-on-a-single-cluster) + - [Prerequisites](#prerequisites) + - [Installation Steps](#installation-steps) + - [Deploying the control planes](#deploying-the-control-planes) + - [Deploying the applications](#deploying-the-applications) + - [Validation](#validation) + - [Checking application to control plane mapping](#checking-application-to-control-plane-mapping) + - [Checking application connectivity](#checking-application-connectivity) - [Multi-cluster](#multi-cluster) - [Prerequisites](#prerequisites) - [Common Setup](#common-setup) @@ -468,6 +476,250 @@ Steps: ``` The old `IstioRevision` resource and the old control plane will be deleted when the grace period specified in the `Istio` resource field `spec.updateStrategy.inactiveRevisionDeletionGracePeriodSeconds` expires. +## Multiple meshes on a single cluster + +The Sail Operator supports running multiple meshes on a single cluster and associating each workload with a specific mesh. +Each mesh is managed by a separate control plane. + +Applications are installed in multiple namespaces, and each namespace is associated with one of the control planes through its labels. +The `istio.io/rev` label determines which control plane injects the sidecar proxy into the application pods. +Additional namespace labels determine whether the control plane discovers and manages the resources in the namespace. +A control plane will discover and manage only those namespaces that match the discovery selectors configured on the control plane. +Additionally, discovery selectors determine which control plane creates the `istio-ca-root-cert` ConfigMap in which namespace. + +Currently, discovery selectors in multiple control planes must be configured so that they don't overlap (i.e. the discovery selectors of two control planes don't match the same namespace). +Each control plane must be deployed in a separate Kubernetes namespace. + +This guide explains how to set up two meshes: `mesh1` and `mesh2` in namespaces `istio-system1` and `istio-system2`, respectively, and three application namespaces: `app1`, `app2a`, and `app2b`. +Mesh 1 will manage namespace `app1`, and Mesh 2 will manage namespaces `app2a` and `app2b`. +Because each mesh will use its own root certificate authority and configured to use a peer authentication policy with the `STRICT` mTLS mode, the communication between the two meshes will not be allowed. + +### Prerequisites + +- Install [istioctl](common/install-istioctl-tool.md). +- Kubernetes 1.23 cluster. +- kubeconfig file with a context for the Kubernetes cluster. +- Install the Sail Operator and the Sail CRDs to the cluster. + +### Installation Steps + +#### Deploying the control planes + +1. Create the system namespace `istio-system1` and deploy the `mesh1` control plane in it. + ```sh + $ kubectl create namespace istio-system1 + $ kubectl label ns istio-system1 mesh=mesh1 + $ kubectl apply -f - < Date: Tue, 3 Dec 2024 11:20:34 +0100 Subject: [PATCH 2/2] Fix apiVersion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marko Lukša --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index b1fa981a8..e879a7dc6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -559,7 +559,7 @@ Because each mesh will use its own root certificate authority and configured to EOF $ kubectl apply -f - <