https://github.com/eitco/cluster-api-addon-provider-cdk8s
ClusterAPI Addon Provider for cdk8s
https://github.com/eitco/cluster-api-addon-provider-cdk8s
Last synced: 10 months ago
JSON representation
ClusterAPI Addon Provider for cdk8s
- Host: GitHub
- URL: https://github.com/eitco/cluster-api-addon-provider-cdk8s
- Owner: eitco
- License: apache-2.0
- Created: 2025-07-17T09:29:01.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-21T16:05:29.000Z (11 months ago)
- Last Synced: 2025-07-21T16:34:48.100Z (11 months ago)
- Language: Go
- Size: 1.91 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: code-of-conduct.md
- Security: SECURITY_CONTACTS
Awesome Lists containing this project
README
# Cluster API Add-on Provider for Cdk8s
## Cdk8sAppProxy CRD
The `Cdk8sAppProxy` CustomResourceDefinition (CRD) is used to manage the deployment of cdk8s applications to workload clusters. It allows users to specify the source of the cdk8s application, any input values, and the target clusters for deployment.
### Example Manifest
An example of a `Cdk8sAppProxy` manifest can be found in [`examples/cdk8sappproxy_sample-go.yaml`](./examples/cdk8sappproxy_sample-go.yaml). Below is a snippet:
```yaml
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: Cdk8sAppProxy
metadata:
name: cdk8s-sample-app-go
namespace: default
spec:
gitRepository:
url: "https://github.com/eitco/cluster-api-addon-provider-cdk8s"
reference: "main"
referencePollInterval: "5m"
path: "examples/cdk8s-sample-deployment"
clusterSelector: {} # Matches all clusters in the same namespace
# matchLabels:
# environment: development
```
### Cdk8sAppProxySpec Fields
- **gitRepository**: (Optional) Specifies the Git repository for the cdk8s application. `gitRepository` must be specified.
- **url**: (Required) The Git repository URL.
- **reference**: (Required) The Git reference (branch, tag, or commit) to check out.
- **referencePollInterval**: (Optional) The interval at which the controller checks for changes in the Git repository. Defaults to `5m`.
- **path**: (Required) The path within the repository where the cdk8s application is located. Defaults to the root.
- **clusterSelector**: (Required) A `metav1.LabelSelector` that specifies which workload clusters the cdk8s application should be deployed to. The controller will watch for clusters matching this selector in the same namespace as the `Cdk8sAppProxy` resource.
## Examples
Examples of `Cdk8sAppProxy` usage can be found in the `/examples` directory in this repository.
- [`examples/cdk8sappproxy_sample-go.yaml`](./examples/cdk8sappproxy_sample-go.yaml): This example demonstrates how to deploy a sample cdk8s application from a public Git repository to clusters matching a specific label selector. It shows the usage of the `gitRepository` field.
- [`examples/cdk8sappproxy_sample-typescript.yaml`](./examples/cdk8sappproxy_sample-typescript.yaml): This directory contains a sample cdk8s application written in Typescript, which also generates a kustomization file.
### Code of conduct
Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).