cloudstate-operator

module
v0.0.0-...-82207cb Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: Apache-2.0

README

Cloudstate Operator

Prereqs

For details see https://book.kubebuilder.io/quick-start.html#prerequisites.

You need:

  • golang 1.13
  • kustomize v3.4.0
  • kubebuilder 2.2.0
  • controller-gen v0.2.4

Take a look at the CI setup script for details on installing these.

Development

It is suggested you go through the kubebuilder book to understand the basics of kubebuilder.

The basic development approach is:

  1. Update the CRD types in [api].
  2. Run make manifests generate to update auto generated code and yaml.
  3. Modify [controllers] as needed to implement the changes required.

Make quick reference

make test     # build controller and run tests
make run      # build and run the controller locally against the current kubectl context
make install  # install the operator CRDs into the current kubectl context
make deploy   # build the operator image, and install the operator and CRD yaml into the current kubectl context

Directory structure

The directory structure of this project is:

  • [api] - Contains the CustomResourceDefinition structs. Update these to modify fields.
  • [controllers] - Contains the reconciliation code for updating resources based on the CRDs.
  • [config] - Autogenerated by make manifests, contains the various yaml files necessary for running the operator.
  • [manifests] - Self-contained yaml resources for installing the operator and its CRDs into a cluster. Generated by make manifests.

Directories

Path Synopsis
internal
pkg
apis/v1alpha1
Package v1alpha1 contains API Schema definitions for the cloudstate v1alpha1 API group +kubebuilder:object:generate=true +groupName=cloudstate.io
Package v1alpha1 contains API Schema definitions for the cloudstate v1alpha1 API group +kubebuilder:object:generate=true +groupName=cloudstate.io
config
TODO: describe package here.
TODO: describe package here.
controllers
TODO: describe package here.
TODO: describe package here.
reconciliation
TODO: describe package here.
TODO: describe package here.
stores
TODO: describe package here.
TODO: describe package here.
webhooks
TODO: describe package here.
TODO: describe package here.

Jump to

Keyboard shortcuts

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