provider-civo

module
v0.0.0-...-0b82885 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0

README

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

Directories

Path Synopsis
Package apis contains Kubernetes API for the Template provider.
Package apis contains Kubernetes API for the Template provider.
civo/cluster/v1alpha1
Package v1alpha1 contains the v1alpha1 group Sample resources of the Template provider.
Package v1alpha1 contains the v1alpha1 group Sample resources of the Template provider.
civo/instance/v1alpha1
Package v1alpha1 contains the v1alpha1 group Sample resources of the Template provider.
Package v1alpha1 contains the v1alpha1 group Sample resources of the Template provider.
civo/provider/v1alpha1
Package v1alpha1 contains the core resources of the Template provider.
Package v1alpha1 contains the core resources of the Template provider.
cmd
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL