crd

command
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

README

Custom Dataset controller

This controller should be deployed on each cluster. It is used to delete S3 object when a Kubernetes Dataset is being deleted.

Some resources regarding controllers

How it works

interaction between a custom controller and client-go Illustration from Writing custom Kubernetes controllers

  • The controller creates an Informer and an Indexer to list, watch and index a Kubernetes object, for our controller it's all about datasets

  • When a new object is being deleted, it calls an event handler to delete the s3 object.

Running it locally

$ go run *.go -kubeconfig=</PATH/TO/YOUR/KUBECONFIG> -alsologtostderr -v 4

Building the docker image

$ CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o controller .
$ docker build -t nerdalize/custom-dataset-controller:<TAG> -f Dockerfile .
$ docker push nerdalize/custom-dataset-controller

Deploying the controller on Kubernetes

Update the docker image tag in the deployment file and then apply it using kubectl:

$ kubectl apply -f deployment.yml

The deployment is always done in the kube-system namespace.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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