This is a quick guide on how to run CCM in development mode.
Unlike other operators, you can't as easily run CCM locally just connected in to a cluster
-
Create a tenant cluster
-
Get the kubeconfig for the tenant cluster
-
Must have a secret called
civo-api-access
within thekube-system
namespace containing keys ofapi-key
,api-url
,cluster-id
,namespace
andregion
-
Make changes, whatever you want
-
Build and push docker image
-
Create all(SA,ClusterRole,ClusterRoleBinding,Deployment) in one (Add docker image in the deployment)
kubectl create -f doc/yaml/ccm-install.yaml --kubeconfig kubeconfig
-
Create a tenant cluster
-
Get the kubeconfig for the tenant cluster
-
Set environment variables CIVO_API_URL, CIVO_API_KEY, CIVO_REGION, CIVO_CLUSTER_ID
-
Make changes, whatever you want
-
Run the CCM against the kubeconfig of the tenant cluster
go run cloud-controller-manager/cmd/civo-cloud-controller-manager/main.go --kubeconfig kubeconfig