package
1.0.2
Repository: https://github.com/nerdalize/nerd.git
Documentation: pkg.go.dev

# 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.

# Packages

No description provided by the author
No description provided by the author

# Functions

NewController returns a new dataset controller.

# Structs

Controller is the controller implementation for Dataset resources Good to read to understand the different components: https://engineering.bitnami.com/articles/a-deep-dive-into-kubernetes-controllers.html.
S3AWS handler implements Handler interface.

# Interfaces

Handler is implemented by any handler.