Skip to content

grafana/alloy-operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alloy Operator

The Alloy Operator is a Kubernetes Operator that manages the lifecycle of Grafana Alloy instances. It is built with the Operator SDK using the Alloy Helm chart as its base.

Usage

To use the Alloy Operator, there are three steps to follow:

  1. Deploy the Alloy CustomResourceDefinition (CRD).
  2. Deploy the Alloy Operator.
  3. Deploy an Alloy instance.

Install the CRD

$ kubectl apply -f https://raw.githubusercontent.com/grafana/alloy-operator/refs/heads/main/operator/manifests/crd.yaml

Install the Operator

$ kubectl apply -f https://raw.githubusercontent.com/grafana/alloy-operator/refs/heads/main/operator/manifests/operator.yaml

Deploy an Alloy instance

Create a file for your Alloy instance:

---
apiVersion: collectors.grafana.com/v1alpha1
kind: Alloy
metadata:
  name: alloy-test
spec:
  alloy:
    configMap:
      content: |-
        prometheus.exporter.self "default" {}

        prometheus.scrape "default" {
          targets    = prometheus.exporter.self.default.targets
          forward_to = [prometheus.remote_write.local_prom.receiver]
        }

        prometheus.remote_write "local_prom" {
          endpoint {
            url = "http://prometheus-server.prometheus.svc:9090/api/v1/write"
          }
        }

The spec section supports all fields in the Alloy Helm chart's values file.

For some examples, see the tests that are used within this repository:

NOTE: The Alloy instances do not deploy the PodLogs CRD, nor does it support the crds field in the spec.

Contributing

We welcome contributions to the Grafana Alloy Operator! Please see our Contributing Guide for more information.

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages