operator-sample-go
This project contains Kubernetes operator samples that demonstrate best practices how to develop operators with Go and the Operator SDK.
Setup
The project contains a custom application controller, a database controller simulating an external resource and a sample microservice. The easiest way to get started is to run the application controller only and refer to the database resource definition and the built microservice image on Docker.io.
Follow these instructions to run the application controller.
See the readme documents for all components:
Current Capabilities
- Kubernetes version and capabilities
- Code: snippet
- Status updates and conditions
- Code: snippet
- Deletions via child first strategy
- Code: snippet
- Deletions via programmatic strategy, for example for external resources
- Accessing third party custom resources
- Updates of deployed resources
- Code: snippet
- Setup of watchers
- Code: snippet
Capabilities to be added
- Deployment/bundling
- Setup of RBAC
- Life cycle manager
- Versioning
- Webhooks
- Change checks via hash
- Metrics
- Creation of database schemas
- Scope: namespace vs global
- Phase 3 – 5
- Testing
- Leader strategy
- Creations of database schemas
Go Development Techniques to be documented
- IDE usage and tips
- Debugging
- Where to find documentation
- Imports and packages
- Pointers
- Constants
Blogs
- Deleting Resources in Kubernetes Operators
- Accessing third Party Custom Resources in Go Operators
- Finding out the Kubernetes Version in Operators
- Creating Database Schemas in Kubernetes Operators
- Resources to build Kubernetes Operators