Skip to content

upsidr/provider-civo

 
 

Repository files navigation

provider-civo

Overview

This provider-civo repository is the Crossplane infrastructure provider for Civo. The provider that is built from the source code in this repository can be installed into a Crossplane control plane and adds the following new functionality:

  • CivoKubernetes
  • CivoInstances

Contributing

provider-civo is a community driven project and we welcome contributions. See the Crossplane Contributing guidelines to get started. Please look at dev.md for local development.

Contact

Please use the following to reach members of the community:

Code of Conduct

provider-civo adheres to the same Code of Conduct as the core Crossplane project.

Usage

Prerequisites

Set-up a Kubernetes cluster with Crossplane installed. The instructions can be found in the official Crossplane documentation.

To add the Civo Provider Configuration Package, run:

kubectl crossplane install provider xpkg.upbound.io/civo/provider-civo:v0.1

In this case, we are going to follow the resources in the example repostory.

Before creating a Provider resource, edit the API key in provider.yaml. You can find the API key in your Civo account at Settings > Profile > Security.

Next, we can apply the Provider:

kubectl apply -f examples/civo/provider/provider.yaml

Once the resource has been created, we can apply the cluster resource:

kubectl apply -f examples/civo/cluster/cluster.yaml

This will create a new Kubernetes cluster, according to the specifications provided in the cluster. You can check the status with kubectl:

kubectl get civokubernetes.cluster.civo.crossplane.io
NAME              READY   MESSAGE             APPLICATIONS
test-crossplane   True    Cluster is active   ["argo-cd","prometheus-operator"]

Connection details

With the use of kubectl it is possible to retrieve the CivoKubernetes kubeconfig directly.

Getting a kubeconfig:

kubectl get secrets cluster-details -o jsonpath="{.data.kubeconfig}" | base64 -d > kubeconfig

Validating our new cluster:

kubectl get nodes --kubeconfig kubeconfig
NAME                                       STATUS   ROLES    AGE     VERSION
k3s-test-cluster-ec4e8ef1-node-pool-41cf   Ready    <none>   4m21s   v1.20.2+k3s1
k3s-test-cluster-ec4e8ef1-node-pool-23e0   Ready    <none>   4m13s   v1.20.2+k3s1

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 89.8%
  • Makefile 9.7%
  • Dockerfile 0.5%