Skip to content

dalton-hill-0/provider-helm

 
 

Repository files navigation

Build Actions Status GitHub release Go Report Card

provider-helm

provider-helm is a Crossplane Provider that enables deployment and management of Helm Releases on Kubernetes clusters typically provisioned by Crossplane:

  • A Provider resource type that only points to a credentials Secret.
  • A Release resource type that is to manage Helm Releases.
  • A managed resource controller that reconciles Release objects and manages Helm releases.

Install

If you would like to install provider-helm without modifications, you may do so using the Crossplane CLI in a Kubernetes cluster where Crossplane is installed:

kubectl crossplane install provider crossplanecontrib/provider-helm:master

You may also manually install provider-helm by creating a Provider directly:

apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-helm
spec:
  package: "crossplanecontrib/provider-helm:master"

Design

See the design document.

Developing locally

Start a local development environment with Kind where crossplane is installed:

make local-dev

Run controller against the cluster:

make run

Since controller is running outside of the Kind cluster, you need to make api server accessible (on a separate terminal):

sudo kubectl proxy --port=8081

Testing in Local Cluster

  1. Prepare provider config for local cluster:

    1. If helm provider running in cluster (e.g. provider installed with crossplane):

      SA=$(kubectl -n crossplane-system get sa -o name | grep provider-helm | sed -e 's|serviceaccount\/|crossplane-system:|g')
      kubectl create clusterrolebinding provider-helm-admin-binding --clusterrole cluster-admin --serviceaccount="${SA}"
      kubectl apply -f examples/provider-config/provider-config-incluster.yaml
      
    2. If provider helm running outside of the cluster (e.g. running locally with make run)

      KUBECONFIG=$(kind get kubeconfig --name local-dev | sed -e 's|server:\s*.*$|server: http://localhost:8081|g')
      kubectl -n crossplane-system create secret generic cluster-config --from-literal=kubeconfig="${KUBECONFIG}" 
      kubectl apply -f examples/provider-config/provider-config-with-secret.yaml
      
  2. Now you can create Release resources with provider reference, see sample release.yaml.

    kubectl create -f examples/sample/release.yaml
    

Cleanup

make local.down

About

Crossplane Helm Provider

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 93.6%
  • Shell 3.3%
  • Makefile 2.9%
  • Dockerfile 0.2%