Skip to content

Commit 6d9113b

Browse files
docs(kubernetes_multicluster): address review comments on README
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
1 parent 0fb100e commit 6d9113b

1 file changed

Lines changed: 36 additions & 11 deletions

File tree

  • pkg/app/pipedv1/plugin/kubernetes_multicluster

pkg/app/pipedv1/plugin/kubernetes_multicluster/README.md

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ kubernetes_multicluster/
4848
├── livestate/ # Live state fetcher (reports current resource state across clusters)
4949
├── planpreview/ # Plan preview (shows diff before deployment)
5050
├── toolregistry/ # Tool registry for kubectl, kustomize, and helm binaries
51+
├── docs/ # Static assets for the README (screenshots, diagrams)
5152
└── example/ # Example application configurations
5253
```
5354

@@ -82,14 +83,14 @@ spec:
8283
deployTargets:
8384
- name: cluster1
8485
config:
85-
masterURL: https://127.0.0.1:61337
8686
kubeConfigPath: /path/to/kubeconfig/for/cluster1
8787
- name: cluster2
8888
config:
89-
masterURL: https://127.0.0.1:62082
9089
kubeConfigPath: /path/to/kubeconfig/for/cluster2
9190
```
9291
92+
See [Plugin Configuration](#plugin-configuration) for all available fields.
93+
9394
Then start piped as usual. The plugin process will be launched automatically on the specified port.
9495
9596
> [!NOTE]
@@ -119,18 +120,14 @@ Refer to [cmd/pipecd/README.md](../../../../../cmd/pipecd/README.md) to set up t
119120
Run unit tests from the repository root:
120121

121122
```bash
122-
go test ./pkg/app/pipedv1/plugin/kubernetes_multicluster/...
123+
make test/go MODULES=pkg/app/pipedv1/plugin/kubernetes_multicluster
123124
```
124125

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.
126127

127128
### Integration tests
128129

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).
134131

135132
The simplest approach for local development is to use kind clusters as shown above.
136133

@@ -169,7 +166,35 @@ spec:
169166

170167
| Field | Type | Description | Required |
171168
|-|-|-|-|
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 |
173198

174199
#### DeployTargetConfig
175200

@@ -223,7 +248,7 @@ spec:
223248
| Field | Type | Description | Required |
224249
|-|-|-|-|
225250
| 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 |
227252
| workloads | [][K8sResourceReference](#k8sresourcereference) | Which resources are treated as the application workload. Empty means all Deployments. | No |
228253
| service | [K8sResourceReference](#k8sresourcereference) | Which resource is treated as the Service. Empty means the first Service found. | No |
229254
| variantLabel | [KubernetesVariantLabel](#kubernetesvariantlabel) | The label used to distinguish variant resources. | No |

0 commit comments

Comments
 (0)