Crevil / humio-operator

Kubernetes Operator for Humio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Humio-Operator

Build Status Go Report Card

WARNING: The CRD/API has yet to be defined. Everything as of this moment is considered experimental.

The Humio operator is a Kubernetes operator to automate provisioning, management, autoscaling and operations of Humio clusters deployed to Kubernetes.

Terminology

  • CRD: Short for Custom Resource Definition. This is a way to extend the API of Kubernetes to allow new types of objects with clearly defined properties.
  • CR: Custom Resource. Where CRD is the definition of the objects and their available properties, a CR is a specific instance of such an object.
  • Controller and Operator: These are common terms within the Kubernetes ecosystem and they are implementations that take a defined desired state (e.g. from a CR of our HumioCluster CRD), and ensure the current state matches it. They typically includes what is called a reconciliation loop to help continuously ensuring the health of the system.
  • Reconciliation loop: This is a term used for describing the loop running within controllers/operators to keep ensuring current state matches the desired state.

Prerequisites

The Humio Operator expects a running Zookeeper and Kafka. There are many ways to run Zookeeper and Kafka but generally a good choice is the Banzai Cloud Kafka Operator. They also recommend using Pravega's Zookeeper Operator. If you are running in AWS, we generally recommend the MSK service.

Installation

See charts/humio-operator/README.md.

Running a Humio Cluster

See instructions at docs/README.md and examples of custom resources at examples/.

Development

Unit Testing

Tests can be run by executing:

make test

E2E Testing (Kubernetes)

We use kind for local testing.

Note that for running zookeeper and kafka locally, we currently rely on the cp-helm-charts and that that repository is cloned into a directory ~/git/humio-cp-helm-charts.

To run a e2e test locally using kind, execute:

make run-e2e-tests-local-kind

To stop the kind cluster again, execute:

hack/stop-kind.sh

E2E Testing (OpenShift)

We use crc for local testing.

Note that for running zookeeper and kafka locally, we currently rely on the cp-helm-charts and that that repository is cloned into a directory ~/git/humio-cp-helm-charts.

Prerequisites:

  • Download the crc binary, make it executable and ensure it is in $PATH.
  • Populate a file named .crc-pull-secret.txt in the root of the repository with your pull secret for crc.

To run a e2e test locally using crc, execute:

make run-e2e-tests-local-crc

To stop the crc cluster again, execute:

hack/stop-crc.sh

Publishing new releases

In order to publish new release of the different components, we have the following procedures we can follow:

Note: For now, we only release one component at a time due to how our workflows in GitHub Actions.

License

Apache License 2.0

About

Kubernetes Operator for Humio

License:Apache License 2.0


Languages

Language:Go 93.3%Language:Shell 5.9%Language:Dockerfile 0.6%Language:Makefile 0.2%Language:Smarty 0.0%