capargo

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 1 Imported by: 0

README

capargo

Automatically register any Cluster API cluster in your local ArgoCD instance.

The capargo controller (Cluster API for ArgoCD) performs the tedious task of adding a new Cluster API cluster in the ArgoCD installation that's running on the same cluster. This allows for a seamless experience between the creation of a new cluster, and the cluster having all the necessary workloads installed and maintained by ArgoCD.

Installation

The capargo controller can be installed either directly from a YAML manifest or via kustomize templates in the manifests directory. To install the latest released version of the controller from the install.yaml manifest, run the following command:

kubectl apply -f https://github.com/superorbital/capargo/releases/latest/download/install.yaml

Installation instructions for previous releases can be found in capargo releases.

[!NOTE] The default installation assumes that ArgoCD is installed in the argocd namespace. This needs to be changed if your cluster's ArgoCD installation is in a different namespace. This is controlled by the --argo-namespace flag on the capargo binary.

Support Matrix

Provider Cluster Control Plane API group/version Supported?
VCluster infrastructure.cluster.x-k8s.io/v1alpha1 Yes
AWSCluster controlplane.cluster.x-k8s.io/v1beta1 Yes

Development

Pre-requisites

You will need the following tools installed in your computer for local development purposes:

For testing your changes, you will additionally need:

Building

To build the binary, simply run:

task build

To build the Docker image, run:

task build-image
Testing

For testing changes, a Kind cluster with all the necessary components can be bootstrapped by running the following task at the root of the repo:

task create-cluster

This will create the Kind cluster, a local container registry, and install ArgoCD and Cluster API + Cluster API Provider vCluster (CAPV).

After this is done, you can retrieve the kubeconfig for the cluster using the command

task get-kubeconfig

which will create a kind-cluster.kubeconfig file that you can use to talk to your cluster.

You will need to push your image of capargo to the local container registry:

docker push localhost:5001/superorbital/capargo:local

After which, you can run the demo script that will create a CAPV cluster for your capargo Pod to interact with.

task install-demo

Cleanup

To clean up the Kind cluster and the local registry:

task cleanup-cluster

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳