opslevel-agent

by OpsLevel

Helm chartv2025.9.10App 2025.9.10Verified publisher

The OpsLevel Kubernetes agent.

About this chart

OpsLevel Agent

This chart installs the opslevel-agent for your kubernetes clusters

Prerequisites

Values.yaml

The bare minimum values file look like this

secret:
  data:
    OPSLEVEL_API_TOKEN: "XXXXX"
helm install opslevel-agent opslevel/opslevel-agent -f values.yaml

Multiple Clusters

If you intend to deploy the agent to multiple clusters you may want to create a unique integration tile in your OpsLevel account for each cluster so that you know which cluster the recommendations are coming from. If you do this you'll need to specify the integration's alias in the values file you'll want the agent to submit for like this:

agent:
  integration: "prod-cluster"

Custom Data Mapping

Opslevel has added a new integration type that allows for mapping properties and relationships to components (and it supports suggestions)

You will need opslevel-agent version v2025.7.23 or newer

To configure the agent to send payloads at this integration in your values.yaml you would do:

agent:
  integration: "https://app.opslevel.com/integrations/custom/webhook/XXXXXXXXXXXXXXXXXXXXXXX"

Then on the integration settings in OpsLevel you can add extrators and transformers like this to map data

---
extractors:
- external_kind: apps_v1_Deployment
  external_id: ".metadata.uid"
  exclude: .metadata.namespace == "kube-system"
- external_kind: apps_v1_StatefulSet
  external_id: ".metadata.uid"
  exclude: .metadata.namespace == "kube-system"
- external_kind: v1_Namespace
  external_id: ".metadata.uid"

and

---
transforms:
- external_kind: v1_Namespace
  opslevel_kind: service
  opslevel_identifier: .metadata.name + "-service"
  on_component_not_found: suggest
- external_kind: apps_v1_Deployment
  opslevel_kind: runtime
  opslevel_identifier: ".metadata.name"
  on_component_not_found: suggest
  properties:
    namespace: ".metadata.namespace"
    containers: ".spec.template.spec | .containers + .initContainers | map(.image)"
    service: .metadata.annotations."opslevel.com/service" // (.metadata.namespace + "-service")
- external_kind: apps_v1_StatefulSet
  opslevel_kind: runtime
  opslevel_identifier: ".metadata.name"
  on_component_not_found: suggest
  properties:
    namespace: ".metadata.namespace"
    containers: ".spec.template.spec | .containers + .initContainers | map(.image)"
    service: .metadata.annotations."opslevel.com/service" // (.metadata.namespace + "-service")

Note: this maps deployments and statefulsets to a new "runtime" component defined by you

Read our integration documentation for further information on whats possible in these configuration settings.

A handy tip for playing around with the mappings you can use the "Test Configuration" section by copying a kubernetes resource data to the sample payload using this simple command

kubectl get deployment <deployment_name> -o json | pbcopy

Resource Targeting

By default the agent will target the following resources:

  • v1/Service
  • apps/v1/Deployment
  • apps/v1/StatefulSet
  • apps/v1/DaemonSet
  • batch/v1/CronJob

but if you want other resource types to make suggestions you can add configuration so long as the resource types show up when you use kubectl api-resources --verbs="get,list".

The following restricts the agent to only syncronize Service and APIService resources:

configmap:
  data:
    config.yaml: |
      selectors:
      - apiVersion: "v1"
        kind: Service
      - apiVersion: "apiregistration.k8s.io/v1"
        kind: APIService

Deploy opslevel-agent with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has opslevel-agent on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartopslevel-agent is pinned at v2025.9.10 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply