Skip to content

Commit 33aa447

Browse files
committed
address requested changes in PR
On-behalf-of: @SAP angel.kafazov@sap.com Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
1 parent 81c3f85 commit 33aa447

3 files changed

Lines changed: 47 additions & 34 deletions

File tree

.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export default withMermaid({
114114
text: 'Set up and run',
115115
items: [
116116
{ text: 'Set up Platform Mesh locally', link: '/how-to-guides/set-up-platform-mesh-locally' },
117+
{ text: 'Set up remote deployment', link: '/how-to-guides/set-up-remote-deployment' },
117118
{ text: 'Speed up local rebuilds', link: '/how-to-guides/speed-up-local-rebuilds' },
118119
]
119120
},

how-to-guides/set-up-remote-deployment.md

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,61 @@ personas: [platform-owner]
77

88
Use this how-to to deploy Platform Mesh across multiple clusters, where the operator runs on one cluster but manages resources on separate runtime and infra clusters.
99

10+
## When to use this
11+
12+
Remote deployment fits scenarios where Platform Mesh's control-plane workloads cannot live on the same cluster as the operator. Common cases:
13+
14+
- **Separation of concerns** — keep kcp, OCM, and the `PlatformMesh` resource on a dedicated runtime cluster, while the operator and GitOps tooling run elsewhere.
15+
- **Shared GitOps cluster** — a central cluster runs FluxCD or ArgoCD and rolls out releases to one or more runtime clusters.
16+
- **Compliance or isolation** — runtime workloads must run in a network or tenant boundary that the operator cluster cannot host.
17+
18+
If everything runs on the same cluster, you do not need this guide.
19+
1020
::: warning Alpha feature
1121
Remote deployment is functional but limited to a single remote deployment per operator instance. APIs and Helm values may change.
1222
:::
1323

1424
## Prerequisites
1525

16-
- A running Kubernetes cluster for the operator (the **local** cluster)
26+
- A running Kubernetes cluster for the operator (the **operator** cluster)
1727
- A separate Kubernetes cluster for the runtime workloads (the **runtime** cluster) — this is where kcp, OCM, and the PlatformMesh resource live
18-
- Optionally, a third cluster for FluxCD or ArgoCD (the **infra** cluster) — if not provided, the local cluster serves this role
28+
- Optionally, a third cluster for FluxCD or ArgoCD (the **infra** cluster) — if not provided, the operator cluster serves this role
1929
- `kubectl` configured to access all clusters
2030
- Helm 3.x installed
2131

2232
## Architecture overview
2333

24-
```
25-
┌─────────────────────┐ ┌─────────────────────────────────┐
26-
│ Local cluster │ │ Runtime cluster │
27-
│ │ │ │
28-
│ platform-mesh- │────▶│ PlatformMesh CR │
29-
│ operator │ │ Profile ConfigMap │
30-
│ │ │ kcp (RootShard, FrontProxy) │
31-
│ (leader election) │ │ OCM Resources │
32-
└─────────────────────┘ └─────────────────────────────────┘
33-
34-
│ (if Local != Infra)
35-
36-
┌─────────────────────────────────┐
37-
│ Infra cluster │
38-
│ │
39-
│ FluxCD / ArgoCD │
40-
│ HelmReleases │
41-
│ OCIRepositories │
42-
│ HelmRepositories │
43-
└─────────────────────────────────┘
34+
```mermaid
35+
graph LR
36+
subgraph Operator["Operator cluster"]
37+
OP["platform-mesh-operator<br/>(leader election)"]
38+
end
39+
40+
subgraph Runtime["Runtime cluster"]
41+
PM["PlatformMesh CR"]
42+
PROF["Profile ConfigMap"]
43+
KCP["kcp (RootShard, FrontProxy)"]
44+
OCM["OCM Resources"]
45+
end
46+
47+
subgraph Infra["Infra cluster (optional)"]
48+
FLUX["FluxCD / ArgoCD"]
49+
HR["HelmReleases"]
50+
OCI["OCIRepositories"]
51+
APPS["HelmRepositories"]
52+
end
53+
54+
OP -->|"reconciles"| PM
55+
OP -->|"reads"| PROF
56+
OP -->|"creates"| HR
57+
FLUX -->|"deploys via kubeConfig secret"| Runtime
4458
```
4559

4660
Remote deployment is considered when the **Runtime** and **Infra** clusters are different. FluxCD HelmReleases receive a `kubeConfig.secretRef` that tells FluxCD to deploy workloads to the runtime cluster. ArgoCD Applications receive a `destination.server` pointing to the runtime cluster API.
4761

4862
## Step 1: Create a kubeconfig secret for the runtime cluster
4963

50-
Generate a kubeconfig that gives the operator access to the runtime cluster. Create a Secret on the **local** cluster:
64+
Generate a kubeconfig that gives the operator access to the runtime cluster. Create a Secret on the **operator** cluster:
5165

5266
```bash
5367
kubectl create secret generic platform-mesh-kubeconfig \
@@ -69,7 +83,7 @@ This secret is referenced by every HelmRelease via `spec.kubeConfig.secretRef`.
6983

7084
## Step 3: (Optional) Create a kubeconfig secret for the infra cluster
7185

72-
If the operator does not run on the infra cluster (that is, **Local** != **Infra**), create a Secret on the local cluster with credentials to reach the infra cluster:
86+
If the operator does not run on the infra cluster (that is, **Operator** != **Infra**), create a Secret on the operator cluster with credentials to reach the infra cluster:
7387

7488
```bash
7589
kubectl create secret generic platform-mesh-infra-kubeconfig \
@@ -94,7 +108,7 @@ helm install platform-mesh-operator \
94108
--set remoteRuntime.infra.secretKey=kubeconfig
95109
```
96110

97-
If **Local** != **Infra**, also add:
111+
If **Operator** != **Infra**, also add:
98112

99113
```bash
100114
--set remoteInfra.enabled=true \
@@ -111,7 +125,7 @@ If **Local** != **Infra**, also add:
111125
| `remoteRuntime.secretKey` | `kubeconfig` | Key within the secret |
112126
| `remoteRuntime.infra.secretName` | `platform-mesh-secret` | Secret for FluxCD to deploy to the runtime cluster |
113127
| `remoteRuntime.infra.secretKey` | `kubeconfig` | Key within the infra secret |
114-
| `remoteInfra.enabled` | `false` | Enable remote infra cluster (only if Local != Infra) |
128+
| `remoteInfra.enabled` | `false` | Enable remote infra cluster (only if Operator != Infra) |
115129
| `remoteInfra.secretName` | `platform-mesh-kubeconfig` | Secret with kubeconfig to reach the infra cluster |
116130
| `remoteInfra.secretKey` | `kubeconfig` | Key within the secret |
117131

@@ -182,8 +196,6 @@ spec:
182196
referencePath:
183197
- name: core
184198
kcp:
185-
adminSecretRef:
186-
name: platform-mesh-kcp-internal-admin-kubeconfig
187199
providerConnections:
188200
- endpointSliceName: core.platform-mesh.io
189201
path: root:platform-mesh-system
@@ -195,7 +207,7 @@ The operator links the two resources by naming convention: a PlatformMesh instan
195207

196208
## Step 6: Verify the deployment
197209

198-
Check the operator logs on the local cluster:
210+
Check the operator logs on the operator cluster:
199211

200212
```bash
201213
kubectl logs -n platform-mesh-system -l app=platform-mesh-operator --tail=50

reference/components/platform-mesh-operator.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ spec:
6666
|-------|-------------|
6767
| `exposure` | External exposure settings: `baseDomain`, `port`, `protocol` |
6868
| `kcp` | kcp workspace topology: provider connections, extra workspaces, API bindings |
69-
| `values` | Free-form JSON deep-merged with the profile's `components` section and passed as Helm values to each service |
70-
| `infraValues` | Free-form JSON merged with the profile's `infra` section |
69+
| `values` | Free-form JSON merged with the profile's `components` section and passed as Helm values to each service. The merge is recursive — keys present in both the profile and `spec.values` are combined per nested level, and any leaf value in `spec.values` wins over the profile |
70+
| `infraValues` | Free-form JSON recursively merged with the profile's `infra` section (same merge semantics as `values`) |
7171
| `ocm` | OCM repository, component name, and reference path for component delivery |
7272
| `profileConfigMap` | Optional reference to profile ConfigMap (name/namespace). Defaults to `<instance-name>-profile` in the instance namespace |
7373
| `featureToggles` | List of named feature flags (see [Feature toggles](#feature-toggles)) |
@@ -263,7 +263,7 @@ Remote deployment is used when the **Runtime** cluster (KCP, OCM) and the **Infr
263263
264264
```mermaid
265265
graph LR
266-
subgraph Local["Local cluster"]
266+
subgraph Operator["Operator cluster"]
267267
OP["platform-mesh-operator"]
268268
end
269269
@@ -291,14 +291,14 @@ graph LR
291291

292292
| Cluster | Role |
293293
|---------|------|
294-
| **Local** | Where the operator pod runs |
294+
| **Operator** | Where the operator pod runs |
295295
| **Runtime** | KCP, OCM Resources, PlatformMesh CR, profile ConfigMap |
296296
| **Infra** | FluxCD HelmReleases / ArgoCD Applications, OCIRepositories, HelmRepositories |
297297

298298
When using remote deployment:
299299
- The PlatformMesh resource and profile ConfigMap must be created on the **runtime** cluster — the operator reconciles them remotely.
300300
- `--remote-runtime-kubeconfig` points the operator's manager to the runtime cluster.
301-
- `--remote-infra-kubeconfig` is only needed if the operator does not run on the infra cluster (**Local** != **Infra**).
301+
- `--remote-infra-kubeconfig` is only needed if the operator does not run on the infra cluster (**Operator** != **Infra**).
302302
- HelmReleases gain `spec.kubeConfig.secretRef` pointing to the runtime cluster secret.
303303
- ArgoCD Applications use `destination.server` to point to the remote runtime cluster.
304304

0 commit comments

Comments
 (0)