Simple Kubernetes operator for handling echo CRDs 🤖

echoperator 🤖

CI Release Deploy Go Report Card Go Reference Artifact HUB License: MIT

Simple Kubernetes operator for handling echo CRDs.

Kubernetes operator pattern implementation using the client-go library. Altough there are a bunch of frameworks for doing this (kubebuilder, operator framework ...), this example operator uses the tools provided by client-go for simplicity and flexibility reasons.

Medium article that explains how to build this operator step by step.

Features

  • Simple example to understand how a Kubernetes operator works.
  • Manages Echo CRDs for executing an echo inside a pod.
  • Manages ScheduledEcho CRDs for scheduling the execution of an echo inside a pod.
  • High Availability operator using Kubernetes lease objects.
  • Prometheus metrics.
  • Helm chart.

Versioning

Echo ScheduledEcho Job CronJob Lease Kubernetes
v1alpha1 v1alpha1 v1 v1 v1 v1.21.x

Installation

helm repo add mmontes https://charts.mmontes-dev.duckdns.org
helm install echoperator mmontes/echoperator

Custom Resource Definitions (CRDs)

The helm chart installs automatically the Custom Resource Definitions needed for this operator to work. However, if you wanted to install them manually, you can find them in the helm chart repo.

Example use cases

Hello world
  • Client creates a hello world Echo CRD.
  • Operator receives a Echo added event.
  • Operator reads the message property from the Echo and creates a Job resource.
  • The Job resource creates a Pod that performs a echo command with the message property.
Scheduled hello world
  • Client creates a hello world ScheduledEcho CRD.
  • Operator receives a ScheduledEcho added event.
  • Operator reads the message and schedule property from the ScheduledEcho and creates a CronJob.
  • The CronJob schedules a Job creation using the schedule property.
  • When scheduled, the Job resource creates a Pod that performs a echo command with the message property.
Owner
Martín Montes
Go ⚡ Node.js ⚡ Kubernetes
Martín Montes
Similar Resources

Operator Permissions Advisor is a CLI tool that will take a catalog image and statically parse it to determine what permissions an Operator will request of OLM during an install

Operator Permissions Advisor is a CLI tool that will take a catalog image and statically parse it to determine what permissions an Operator will request of OLM during an install. The permissions are aggregated from the following sources:

Apr 22, 2022

The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Sep 27, 2022

PolarDB-X Operator is a Kubernetes extension that aims to create and manage PolarDB-X cluster on Kubernetes.

GalaxyKube -- PolarDB-X Operator PolarDB-X Operator is a Kubernetes extension that aims to create and manage PolarDB-X cluster on Kubernetes. It follo

Dec 19, 2022

Kubernetes Operator to sync secrets between different secret backends and Kubernetes

Vals-Operator Here at Digitalis we love vals, it's a tool we use daily to keep secrets stored securely. We also use secrets-manager on the Kubernetes

Nov 13, 2022

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes.

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes.

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes. Apache NiFI is a free, open-source solution that support powerful and scalable directed graphs of data routing, transformation, and system mediation logic.

Dec 26, 2022

A simple Kubernetes Operator template that uses Golang, use it to build your own operators

A simple Kubernetes Operator template that uses Golang, use it to build your own operators

A simple programmatic Kubernetes Operator template. Use this to create your own Kubernetes operators with golang. Build with KIND (Kubernetes in Docke

May 13, 2022

An example of simple Kubernetes operator.

Simple Wordpress Operator An example of simple Kubernetes operator. This operator was created using Operator-SDK 1.14 Creating the Operator Create dir

Nov 1, 2021

Kubernetes Operator for a Cloud-Native OpenVPN Deployment.

Meerkat is a Kubernetes Operator that facilitates the deployment of OpenVPN in a Kubernetes cluster. By leveraging Hashicorp Vault, Meerkat securely manages the underlying PKI.

Jan 4, 2023

Modular Kubernetes operator to manage the lifecycle of databases

Ensemble Ensemble is a simple and modular Kubernetes Operator to manage the lifecycle of a wide range of databases. Infrastructure as code with Kubern

Aug 12, 2022
Basic Kubernetes operator that have multiple versions in CRD. This operator can be used to experiment and understand Operator/CRD behaviors.

add-operator Basic Kubernetes operator that have multiple versions in CRD. This operator can be used to experiment and understand Operator/CRD behavio

Dec 15, 2021
An operator which complements grafana-operator for custom features which are not feasible to be merged into core operator

Grafana Complementary Operator A grafana which complements grafana-operator for custom features which are not feasible to be merged into core operator

Aug 16, 2022
The Elastalert Operator is an implementation of a Kubernetes Operator, to easily integrate elastalert with gitops.

Elastalert Operator for Kubernetes The Elastalert Operator is an implementation of a Kubernetes Operator. Getting started Firstly, learn How to use el

Jun 28, 2022
Minecraft-operator - A Kubernetes operator for Minecraft Java Edition servers

Minecraft Operator A Kubernetes operator for dedicated servers of the video game

Dec 15, 2022
K8s-network-config-operator - Kubernetes network config operator to push network config to switches

Kubernetes Network operator Will add more to the readme later :D Operations The

May 16, 2022
Pulumi-k8s-operator-example - OpenGitOps Compliant Pulumi Kubernetes Operator Example

Pulumi GitOps Example OpenGitOps Compliant Pulumi Kubernetes Operator Example Pr

May 6, 2022
Kubernetes Operator Samples using Go, the Operator SDK and OLM
Kubernetes Operator Samples using Go, the Operator SDK and OLM

Kubernetes Operator Patterns and Best Practises This project contains Kubernetes operator samples that demonstrate best practices how to develop opera

Nov 24, 2022
Test Operator using operator-sdk 1.15

test-operator Test Operator using operator-sdk 1.15 operator-sdk init --domain rbt.com --repo github.com/ravitri/test-operator Writing kustomize manif

Dec 28, 2021
a k8s operator 、operator-sdk

helloworld-operator a k8s operator 、operator-sdk Operator 参考 https://jicki.cn/kubernetes-operator/ https://learnku.com/articles/60683 https://opensour

Jan 27, 2022