Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates=20240203~22.04.1 curl=7.81.0-1ubuntu1.20 && \
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs=18.19.1-1nodesource1 && \
npm install -g [email protected].97 && \
npm install -g [email protected].99 && \
curl -fsSL -o go1.24.4.linux-amd64.tar.gz https://go.dev/dl/go1.24.4.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.24.4.linux-amd64.tar.gz && \
rm go1.24.4.linux-amd64.tar.gz && \
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ CAPI_KIND_CLUSTER_NAME ?= capi-test

# It is set by Prow GIT_TAG, a git-based tag of the form vYYYYMMDD-hash, e.g., v20210120-v0.3.10-308-gc61521971

TAG ?= v0.3.0-alpha
# Next release is: v0.3.2-alpha
TAG ?= v0.3.1-alpha
ARCH ?= $(shell go env GOARCH)
ALL_ARCH = amd64 arm arm64

Expand Down
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

# Cluster API Add-on Provider for Cdk8s

### 👋 Welcome! Here are some links to help you get started:

- [Project design outline](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220712-cluster-api-addon-orchestration.md)

## ✨ What is Cluster API Add-on Provider for Cdk8s?

Cluster API Add-on Provider for Cdk8s extends Cluster API by managing the installation, configuration, upgrade, and deletion of cluster add-ons using cdk8s applications. This provider is based on the [Cluster API Add-on Orchestration Proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20220712-cluster-api-addon-orchestration.md), a larger effort to bring orchestration for add-ons to CAPI by using existing package management tools.
Expand Down Expand Up @@ -47,14 +43,30 @@ apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: Cdk8sAppProxy
metadata:
name: cdk8s-sample-app
namespace: caapc-system
namespace: default
spec:
gitRepository:
url: https://github.com/PatrickLaabs/cdk8s-sample-deployment
# reference: main # Optional: specify a branch, tag, or commit
# path: "" # Optional: specify a path within the repository if cdk8s app is not at root
clusterSelector:
matchLabels: {}
url: "https://github.com/PatrickLaabs/cluster-api-addon-provider-cdk8s/examples/cdk8s-sample-deployment"
reference: "main"
path: "."
# authSecretRef:
# name: git-credentials
clusterSelector: {}
# matchLabels:
# environment: development
# ---
# apiVersion: v1
# kind: Secret
# metadata:
# name: git-credentials
# namespace: default
# type: Opaque
# data:
# # Base64 encoded username
# username: <base64-encoded-username>
# # Base64 encoded password/token
# password: <base64-encoded-password-or-token>

```

### Cdk8sAppProxySpec Fields
Expand Down
4 changes: 0 additions & 4 deletions api/v1alpha1/cdk8sappproxy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ type Cdk8sAppProxySpec struct {
// +kubebuilder:validation:Optional
GitRepository *GitRepositorySpec `json:"gitRepository,omitempty"`

// Values is a string containing the values to be passed to the cdk8s app
// +kubebuilder:validation:Optional
Values string `json:"values,omitempty"`

// ClusterSelector selects the clusters to deploy the cdk8s app to.
// +kubebuilder:validation:Required
ClusterSelector metav1.LabelSelector `json:"clusterSelector"`
Expand Down
4 changes: 0 additions & 4 deletions config/crd/bases/addons.cluster.x-k8s.io_cdk8sappproxies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ spec:
LocalPath is the local filesystem path to the cdk8s app.
One of LocalPath or GitRepository must be specified.
type: string
values:
description: Values is a string containing the values to be passed
to the cdk8s app
type: string
required:
- clusterSelector
type: object
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_image_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ spec:
template:
spec:
containers:
- image: ghcr.io/patricklaabs/cluster-api-addon-provider-cdk8s/cluster-api-cdk8s-controller-amd64:v0.3.0-alpha
- image: ghcr.io/patricklaabs/cluster-api-addon-provider-cdk8s/cluster-api-cdk8s-controller:v0.3.1-alpha
name: manager
2 changes: 1 addition & 1 deletion config/default/manager_image_patch.yaml-e
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ spec:
template:
spec:
containers:
- image: ghcr.io/patricklaabs/cluster-api-addon-provider-cdk8s/cluster-api-cdk8s-controller:v0.2.11-preview
- image: ghcr.io/patricklaabs/cluster-api-addon-provider-cdk8s/cluster-api-cdk8s-controller-arm64:v0.3.1-alpha
name: manager
2 changes: 1 addition & 1 deletion config/default/manager_pull_policy.yaml-e
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
spec:
containers:
- name: manager
imagePullPolicy: IfNotPresent
imagePullPolicy: Always
6 changes: 5 additions & 1 deletion controllers/cdk8sappproxy/cdk8sappproxy_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ const (
)

// gitPollInterval is the interval at which the cdk8sappproxy controller polls the git repository for changes.
const gitPollInterval = 1 * time.Minute
const (
gitPollInterval = 1 * time.Minute
consecutiveErrors = 0
maxConsecutiveErrors = 5
)
Loading
Loading