sasg / operator-sample-go

Kubernetes Operator Samples using Go, the Operator SDK and OLM

Home Page:https://ibm.github.io/operator-sample-go-documentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kubernetes Operator Patterns and Best Practises

This project contains Kubernetes operator samples that demonstrate best practices how to develop operators with Golang, Operator SDK including Kubebuilder and the Operator Lifecycle Manager Framework.

Brief Overview

The repo contains two operators:

  • Application operator: Deploys and manages a front-end micro-service application which provides a simple web UI.
  • Database operator: Deploys and manages a simple database. Used by the front-end application.

Additionally the repo contains four more application components:

  • simple-microservice - A front end web application, written in Java using Quarkus
  • database-service - A simple database application deployed by the database operator, written in Java using Quarkus
  • operator-database-backup - A Go application to query the database and upload the data to cloud object storage. This container is launched on a schedule by the database operator
  • operator-application-scaler - A Go application used to make autoscaling decisions for the front-end. It queries Prometheus metrics exposed by the simple-microservice, and if necessary, modifies the custom resource which defines the size of the front-end deployment. This container is launched on a schedule by the application operator

Scripts are provided to automate build and deployment:

  • scripts - Automation to verify workstation prerequisites, build all container images and deploy to a Kubernetes or OpenShift cluster. Alternatively, the scripts can deploy pre-built 'golden' container images.

Check out this 1-minute demo video of the operators
Operator Sample Go Demo 1 min

Documentation

Extended documentation can be found in this repo: https://ibm.github.io/operator-sample-go-documentation/

IBM Build Labs

This project has been created by IBM Build Labs. We provide a service to selected IBM Business Partners (ISVs) looking to automate the operations of their solutions to meet the demands of clients, and open new routes to market using Red Hat OpenShift on any cloud/platform.

Introduction to IBM Build Labs
Unleash the Power of your Applications

Our 40-minute masterclass video provides a useful inroduction to operators and why to use them
Operators Masterclass

Additional Resources

Credits

About

Kubernetes Operator Samples using Go, the Operator SDK and OLM

https://ibm.github.io/operator-sample-go-documentation/

License:Apache License 2.0


Languages

Language:Shell 56.2%Language:Go 32.2%Language:Java 5.2%Language:Makefile 4.4%Language:Dockerfile 2.0%