You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/app/pipedv1/plugin/kubernetes_multicluster/README.md
+36-11Lines changed: 36 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ kubernetes_multicluster/
48
48
├── livestate/ # Live state fetcher (reports current resource state across clusters)
49
49
├── planpreview/ # Plan preview (shows diff before deployment)
50
50
├── toolregistry/ # Tool registry for kubectl, kustomize, and helm binaries
51
+
├── docs/ # Static assets for the README (screenshots, diagrams)
51
52
└── example/ # Example application configurations
52
53
```
53
54
@@ -82,14 +83,14 @@ spec:
82
83
deployTargets:
83
84
- name: cluster1
84
85
config:
85
-
masterURL: https://127.0.0.1:61337
86
86
kubeConfigPath: /path/to/kubeconfig/for/cluster1
87
87
- name: cluster2
88
88
config:
89
-
masterURL: https://127.0.0.1:62082
90
89
kubeConfigPath: /path/to/kubeconfig/for/cluster2
91
90
```
92
91
92
+
See [Plugin Configuration](#plugin-configuration) for all available fields.
93
+
93
94
Then start piped as usual. The plugin process will be launched automatically on the specified port.
94
95
95
96
> [!NOTE]
@@ -119,18 +120,14 @@ Refer to [cmd/pipecd/README.md](../../../../../cmd/pipecd/README.md) to set up t
119
120
Run unit tests from the repository root:
120
121
121
122
```bash
122
-
go test ./pkg/app/pipedv1/plugin/kubernetes_multicluster/...
123
+
make test/go MODULES=pkg/app/pipedv1/plugin/kubernetes_multicluster
123
124
```
124
125
125
-
Unit tests use [envtest](https://book.kubebuilder.io/reference/envtest) to spin up a real Kubernetes API server in memory. No external cluster is needed.
126
+
The plugin has its own `go.mod`, so `go test ./...` from the repo root will not work. The Makefile target handles the module boundary correctly. Tests use [envtest](https://book.kubebuilder.io/reference/envtest) to spin up a real Kubernetes API server in memory — no external cluster is needed.
126
127
127
128
### Integration tests
128
129
129
-
To test against real clusters, build and run piped with the plugin pointing to real clusters. The plugin resolves kubeconfig in this order:
130
-
131
-
1. `kubeConfigPath` in deploy target config: explicit kubeconfig file path
132
-
2. `masterURL` in deploy target config: explicit API server URL
133
-
3. In-cluster config: when running inside a pod
130
+
To test against real clusters, build and run piped with the plugin pointing to real clusters. Set `kubeConfigPath` in each deploy target config to point to your kubeconfig file — the plugin passes it directly to kubectl. If `kubeConfigPath` is empty, kubectl falls back to its own defaults (e.g. `~/.kube/config` or in-cluster config).
134
131
135
132
The simplest approach for local development is to use kind clusters as shown above.
136
133
@@ -169,7 +166,35 @@ spec:
169
166
170
167
| Field | Type | Description | Required |
171
168
|-|-|-|-|
172
-
| deployTargets | [][DeployTargetConfig](#deploytargetconfig) | List of Kubernetes clusters to deploy to | Yes |
169
+
| deployTargets | [][DeployTargetConfig](#deploytargetconfig) | List of Kubernetes clusters to deploy to. | Yes |
170
+
| config | [KubernetesPluginConfig](#kubernetespluginconfig) | Plugin-level config for Helm chart repositories and registries. | No |
171
+
172
+
#### KubernetesPluginConfig
173
+
174
+
| Field | Type | Description | Required |
175
+
|-|-|-|-|
176
+
| chartRepositories | [][HelmChartRepository](#helmchartrepository) | Helm chart repositories to add on startup. | No |
177
+
| chartRegistries | [][HelmChartRegistry](#helmchartregistry) | Helm chart registries to log in to on startup. | No |
178
+
179
+
#### HelmChartRepository
180
+
181
+
| Field | Type | Description | Required |
182
+
|-|-|-|-|
183
+
| type | string | Repository type. Only `HTTP` is supported. Default is `HTTP`. | No |
184
+
| name | string | Name of the Helm chart repository. | No |
185
+
| address | string | URL of the Helm chart repository. | No |
186
+
| username | string | Username for HTTP basic authentication. | No |
187
+
| password | string | Password for HTTP basic authentication. | No |
188
+
| insecure | bool | Skip TLS certificate checks. Default is `false`. | No |
189
+
190
+
#### HelmChartRegistry
191
+
192
+
| Field | Type | Description | Required |
193
+
|-|-|-|-|
194
+
| type | string | Registry type. Only `OCI` is supported. Default is `OCI`. | No |
195
+
| address | string | Address of the OCI registry. | Yes |
196
+
| username | string | Username for registry authentication. | No |
197
+
| password | string | Password for registry authentication. | No |
173
198
174
199
#### DeployTargetConfig
175
200
@@ -223,7 +248,7 @@ spec:
223
248
| Field | Type | Description | Required |
224
249
|-|-|-|-|
225
250
| input | [KubernetesDeploymentInput](#kubernetesdeploymentinput) | Input for deployment such as manifests, kubectl version, helm/kustomize options. | No |
226
-
| quickSync | [K8sSyncStageOptions](#k8ssyncstageoptions) | Options for the quick sync stage. | No |
251
+
| quickSync | [K8sSyncStageOptions](#k8s_multi_sync) | Options for the quick sync stage. | No |
227
252
| workloads | [][K8sResourceReference](#k8sresourcereference) | Which resources are treated as the application workload. Empty means all Deployments. | No |
228
253
| service | [K8sResourceReference](#k8sresourcereference) | Which resource is treated as the Service. Empty means the first Service found. | No |
229
254
| variantLabel | [KubernetesVariantLabel](#kubernetesvariantlabel) | The label used to distinguish variant resources. | No |
0 commit comments