cluster-controller

command module
v0.0.0-...-5bcd51f Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

README

cluster-controller

This repository implements a controller for watching Cluster resources as defined with a CustomResourceDefinition (CRD).

This is a WIP repo for a POC, TODO alter directory structure and create a CI job to handle codegen, see: https://blog.openshift.com/kubernetes-deep-dive-code-generation-customresources/

Purpose

This custom controller manages a custom resource of type Cluster.

Deploy CRD and create a resource

Creating the KrakenCluster CRD object that defines the schema of a kraken cluster and the resource to be consumed by the controller:

kubectl create -f assets/KrakenClusterCRD.yaml

You may then create a sample resource by running

kubectl create -f assets/test-cluster.yaml

Running

# assumes you have a working kubeconfig, not required if operating in-cluster
$ go run *.go -kubeconfig=$HOME/.kube/config -logtostderr=true

Changing the Specification for KrakenCluster

vi pkg/apis/clustercontroller/v1alpha1/types.go
hack/update-codegen.sh

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
apis/clustercontroller/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/clustercontroller/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/clustercontroller/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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