sandbox-operator

command module
v0.0.0-...-1766b2c Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: MIT Imports: 10 Imported by: 0

README

Logo

@ajdev/sandbox-operator

Go Report Card Contributors Maintained Maintained

Table of Contents

Overview

The purpose of this project is to provide a reference kubernetes operator generated by operator-sdk. The latest kubernetes operator is generated by operator-sdk@1.0.1

Development

  • Instantiate project with operator-sdk:
# init project: all API groups will be <group>.ajdev.com
operator-sdk init --domain=ajdev.com --repo=github.com/ajgrande924/sandbox-operator

# create memcached api
operator-sdk create api --group cache --version v1 --kind Memcached --resource=true --controller=true
  • Update api and controller then update config assets:
# update generated code
make generate

# update manifests
make manifests
  • Build operator controller image:
# build / push operator controller image
make docker-build docker-push IMG=docker.io/ajgrande924/sandbox-operator:1.0.1
  • Install crd and controller to cluster:
make install
make deploy IMG=docker.io/ajgrande924/sandbox-operator:1.0.1
  • Apply custom resource and check:
kubectl apply -f config/samples/cache_v1_memcached.yaml 
kubectl logs deployment.apps/sandbox-operator-controller-manager -n default -c manager
  • Cleanup cluster:
kubectl delete -f config/samples/cache_v1_memcached.yaml
kubectl delete deployments,service -l control-plane=controller-manager
kubectl delete role,rolebinding --all

References

License

Sandbox Operator is under MIT license. See the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1
Package v1 contains API Schema definitions for the cache v1 API group +kubebuilder:object:generate=true +groupName=cache.ajdev.com
Package v1 contains API Schema definitions for the cache v1 API group +kubebuilder:object:generate=true +groupName=cache.ajdev.com

Jump to

Keyboard shortcuts

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