Skip to content

coralogix/coralogix-operator

Repository files navigation

Coralogix Operator

license GitHub tag (latest SemVer pre-release) Go Report Card e2e-tests

Overview

The Coralogix Operator provides Kubernetes-native deployment and management for Coralogix, designed to simplify and automate the configuration of Coralogix APIs through Kubernetes custom resources.

The operator integrates with Kubernetes by supporting a variety of custom resources and controllers to simplify Coralogix management, including:

Getting Started

You’ll need a Kubernetes cluster to run against. You can use KIND to get a local cluster for testing, or run against a remote cluster.

Helm Installation

  1. For using the official helm chart, add the Coralogix repository and update it:
helm repo add coralogix https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
helm repo update
  1. Install the operator with Helm:
helm install <my-release> coralogix/coralogix-operator \
  --set secret.data.apiKey="<api-key>" \
  --set coralogixOperator.region="<region>"
  • To install the operator with its validation webhooks, add the --set coralogixOperator.webhooks.enabled=true flag. This requires cert-manager to be installed in the cluster. A certificate and an issuer will be installed on the cluster.
  • The Prometheus-Operator integration assumes its CRDs are installed. If you wish to disable this integration, add the --set prometheusOperator.prometheusRules.enabled=false flag.
  1. To uninstall the operator, run:
helm delete <my-release>

Local Installation with Kustomize

  1. Clone the operator repository and navigate to the project directory:
git clone https://github.com/coralogix/coralogix-operator.git 
cd coralogix-operator
  1. Set the Coralogix API key and region as environment variables:
export CORALOGIX_API_KEY="<api-key>"
export CORALOGIX_REGION="<region>"

For private domain set the CORALOGIX_DOMAIN environment variable.

  1. For a custom operator image, build and push your image:
make docker-build docker-push IMG=<some-registry>/coralogix-operator:<tag> 
  1. Deploy the operator to the cluster with the image specified by IMG:
make deploy IMG=<some-registry>/coralogix-operator:<tag> 

Note: This will install cert-manager on the cluster if it is not already installed.

  1. To uninstall the operator, run:
make undeploy

Contributing

Please refer to CONTRIBUTING.md.

How it works

This project aims to follow the Kubernetes Operator pattern. It uses Controllers which provides a reconcile function responsible for synchronizing resources until the Desired state is reached on the cluster.