Please refer to the next note if you're using the latest version of the operator A note regarding webhooks and cert-manager 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:
- Custom Resources for Coralogix: Easily deploy and manage Coralogix features, using custom resources like Alerts, RecordingRuleGroupSets, RuleGroups, OutboundWebhooks and others. For a complete list of available APIs and their details, refer to the API documentation.
- Prometheus Operator Integration: The Operator leverages Prometheus Operator CRDs like PrometheusRule and AlertmanagerConfig, to simplify the transition to Coralogix by utilizing existing monitoring configurations. For more details on this integration, see the Prometheus Integration documentation.
- Running Multiple Instances: The operator supports running multiple instances within a single cluster by using label selectors. For more details, see the Running Multiple Instances documentation.
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.
- 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
- Install the operator with Helm:
helm install <my-release> coralogix/coralogix-operator \
--set secret.data.apiKey="<api-key>" \
--set coralogixOperator.region="<region>"
- The Prometheus-Operator integration assumes its CRDs are installed. If you wish to disable this integration, add the
--set prometheusOperator.prometheusRules.enabled=false
flag.
Webhooks are used to validate the custom resources before they are created in the cluster. They are also used to convert the old schema to the new schema. For the webhook to work, cert-manager should be installed in the cluster. Webhooks will be enabled by default in the operator installation, so make sure cert-manager is installed in the cluster. A certificate and an issuer will be installed on the cluster as part of the cert-manager installation.
If you disable the webhooks, the operator will not be able to validate the custom resources before they are created in the cluster. If you are using an old schema of the custom resources, the operator will not be able to convert them to the new schema. That means you will have to manually update the custom resources to the new schema. v1alpha1/Alerts won't be supported if webhooks are disabled, as the storage version is v1beta1. prometheusRules and alertmanagerConfigs controllers won't be able to track alerts that were created in a v1alpha1 schema.
- To uninstall the operator, run:
helm delete <my-release>
- Clone the operator repository and navigate to the project directory:
git clone https://github.com/coralogix/coralogix-operator.git
cd coralogix-operator
- 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.
- For a custom operator image, build and push your image:
make docker-build docker-push IMG=<some-registry>/coralogix-operator:<tag>
- 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.
- To uninstall the operator, run:
make undeploy
Please refer to CONTRIBUTING.md.
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.