kubiya-runner

by Kubiya AI

Helm chartv0.9.4App 0.9.4Verified publisher

A Helm chart for Kubiya Runner deployment

About this chart

Kubiya Runner

A Helm chart for deploying the Kubiya Runner.

Table of Contents

  • Kubiya Runner
    • Table of Contents
    • Overview
    • Directory Structure
    • Prerequisites
    • Permissions
    • Components
      • Agent Manager
      • Kubiya Operator
      • Tool Manager
      • Workflow Engine
      • Image Updater
    • Dependencies & Compatibility Matrix
      • Helm Dependencies
      • Container Images
    • Monitoring & Telemetry
      • Security
      • Architecture
      • Grafana Alloy Configuration
    • Azure Prometheus Integration
    • Grafana Dashboards
      • Single View Runners Cumulative Health Score
      • Health Overview by Components
      • Runner Health Overview
      • Tool Manager Dashboard
      • Agent Manager Dashboard
      • Kubernetes State Dashboard
      • Alloy Dashboard
      • Blackbox Exporter Dashboards
    • Dashboards as a Code
    • K8s Resources Definitions
    • Security
    • Optional Permissions Extensions:
  • Deployment
    • Minimum Required Configuration & Values Passing
    • Installation
    • Update
    • Using Name Overrides

Overview

This repository contains the Helm chart for deploying the Kubiya Runner, a key component of the Kubiya platform for orchestrating and managing automation workflows.

Directory Structure

kubiya-runner/
├── Chart.yaml                                      # Chart metadata
├── values.yaml                                     # Default values for the chart
├── templates/                                      # Templates files
│   ├── components/                                 # Runner Components
│   │   ├── agent-manager/                         # Manages Kubiya agents lifecycle
│   │   ├── kubiya-operator/                       # Controls operational aspects
│   │   ├── tool-manager/                          # Handles tool execution
│   │   └── image-updater/                         # Automatic image updates
│   ├── alloy-configMap.yaml                       # Alloy configuration
│   └── shared-secrets.yaml                        # Secrets shared between runner components
│   └── _helpers.tpl                               # Helpers funtions for Helm Chart templates rendering
└── charts/                                        # Dependencies (subcharts)
    ├── dagger-helm/                               # Container runtime for workflows
    ├── kube-state-metrics/                        # Cluster-level metrics
    └── alloy/                                     # Grafana Alloy telemetry collector

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.0+
  • PV provisioner support in the underlying infrastructure
  • NATS credentials for messaging
  • Registry TLS certificates (if using private registry)

Permissions

Components

Agent Manager

Repository: kubiya-agent-manager

The Agent Manager handles lifecycle management of Kubiya agents within the cluster.

Kubiya Operator

Repository: kubiya-operator

The Kubiya Operator manages operational aspects and configuration of the runner components.

Tool Manager

The Kubiya Tool Manager is a high-performance, container-native utility designed for declarative management and execution of agent tools across diverse computing environments. It provides a scalable, stateless architecture for tool orchestration, supporting both local development and enterprise-scale Kubernetes deployments.

Full documentation is available in project repository.

  • Executes tools within the cluster
  • Integrates with Dagger for container runtime
  • Includes SDK server for tool execution

Workflow Engine

The Workflow Engine is responsible for managing and executing workflows in the Kubiya Runner. It provides a scalable, containerized environment for workflow execution and orchestration.

  • Manages workflow execution and orchestration
  • Communicates with the Tool Manager for tool execution
  • Provides workflow status and metrics

Image Updater

TBD, (depricated approach)

- Checks for updates of latest stable image versions via CronJob (hourly by default).
- Automatic updates for runner components (agent-manager, tool-manager, sdk-server) from stable release JSON file hosted in [S3 bucket](https://kubiya-cli.s3.amazonaws.com/stable/kubiya_versions.json).

Dependencies & Compatibility Matrix

This chart (as of version 0.8.0) is tested to be compatible with the following versions of container images and Helm dependencies.

Helm Dependencies

ChartVersionApp Version
dagger-helm0.4.10.11.6
kube-state-metrics5.27.02.14.0
alloy0.10.1v1.5.1

Container Images

ComponentImageVersion/Tag
Agent Managerghcr.io/kubiyabot/agent-managerv0.4.3
Kubiya Operatorghcr.io/kubiyabot/kubiya-operatorrunner_v2
Tool Managerghcr.io/kubiyabot/tool-manager0.5.4
SDK Serverghcr.io/kubiyabot/sdk-pyv1.20.0
Workflow Engineghcr.io/kubiyabot/workflow-enginev1.46.1
Image Updaterghcr.io/kubiyabot/kubernetes1.32.0
Dagger Engineghcr.io/kubiyabot/kubiya-registryv0.2.1
Kube State Metricsregistry.k8s.io/kube-state-metrics/kube-state-metricsv2.14.0
Grafana Alloygrafana/alloyv1.5.1

Monitoring & Telemetry

The kubiya-runner uses Grafana Alloy for metrics collection from multiple customer runner deployments. Alloy scrapes data from a set of targets (pods, services, etc.) which expose metrics on an endpoint (usually /metrics), processes them (filters, adds runner deployment labels, etc.) and pushes via Prometheus native remote_writes into Azure Managed Prometheus.

Later kubiya-runner chart releases expect to use Alloy for other types of telemetry data collection (such as logs and traces). Alloy also fully compatible with OpenTelemetry and can be configured to listen/send messages in OTEL format if needed, has a long list of vendor platforms and message formats compatibility and a rich set of data processing modules.

Security

Both Alloy and kube-state-metrics has limited RBAC permissions and configured to collect only data from same kubernetes namespace where kubiya-runner is deployed (kubiya by default). Alloy runs as non-root user.

Architecture

graph LR
H[alloy-self-metrics]
A[kube-state-metrics]
B[blackbox-exporter]
C[tool-manager exporter]
D[agent-manager exporter]
E[grafana alloy]
F[azure managed prometheus]
G[grafana dashboards]
W[workflow-engine exporter (under dev)]
subgraph kubiya-runner
    A ---> E
    B ---> E
    C ---> E
    D ---> E
    H ---> E
    W ---> E
    E
end
E ---> F
F ---> G

Grafana Alloy Configuration

  1. Resource Management

Default resource limits for alloy yaml resources: limits: cpu: 1 memory: 1Gi requests: cpu: 100m memory: 128Mi alloy resource estimation guidelines available at: https://grafana.com/docs/alloy/latest/introduction/estimate-resource-usage/

  1. Resources & Data Collection Configuration

To minimizes resource usage and cost on both the client and server sides, telemetry collection strategy focuses on deploying and configuring components to capture only the metrics essential for current business and operational goals. This pattern is highly recommended keeping when contributing.

Alloy is configured with a single scrape interval, collecting metrics from all targets once every 60 seconds. As a result, 60 seconds is the maximum precision for all metric visualizations and alerting.

If this level of precision is insufficient, the scrape interval can be adjusted—either increased or decreased—to balance resource impact. These adjustments can be applied globally or to specific targets via values.yaml:

  alloy:
    scrapeIntervals:
      default: 60s
      runnerExporters: 60s
      alloyExporter: 60s
      blackboxExporter: 60s
      kubeStateMetrics: 60s
      cadvisor: 60s (disabled by default)

Azure Prometheus Integration

Required set of environment variables to be set for Azure Managed Prometheus remote writes support:

  • AZURE_REMOTE_WRITE_URL: Azure Prometheus endpoint
  • AZURE_CLIENT_ID: Azure service principal client ID
  • AZURE_CLIENT_SECRET: Azure service principal secret
  • AZURE_TOKEN_URL: Azure OAuth token URL

These variables confurable via values.yaml alloy.alloy.extraEnv)

Grafana Dashboards

Grafana dashboards JSONs available in the kubiya-runner and located in helm-charts/charts/kubiya-runner/_grafana/dashboards/, alerts as code can be found under helm-charts/charts/kubiya-runner/_grafana/alerts

Single View Runners Cumulative Health Score

Dashboard monitors health using a composite scoring system. Each runner's cumulative health score is calculated as the unweighted average of five key health signals, each normalized to a 0-100% scale:

(
  + Tool-Manager HTTP Success Rate (%)
  + Agent-Manager HTTP Success Rate (%) 
  + Pod Ready Status (%)
  + Pod Restart Stability (%)
  + Probe Success Rate (%)
) / 5

Individual Health Signal Formulas and PromQL Functions

  1. Tool-Manager HTTP Success Rate

    (sum by (organization, runner) (rate(response_status{status=~"2..", app="tool-manager"}[5m])) / 
     sum by (organization, runner) (rate(http_requests_total{app="tool-manager"}[5m]))) * 100
    
    • rate(): Calculates the per-second rate of successful responses over 5-minute window
    • sum by: Aggregates metrics by organization and runner
    • Purpose: Measures percentage of successful (2xx) HTTP responses from the Tool Manager
  2. Agent-Manager HTTP Success Rate

    (sum by (organization, runner) (rate(agent_manager_http_requests_total{status=~"2.."}[5m])) /
     sum by (organization, runner) (rate(agent_manager_http_requests_total[5m]))) * 100
    
    • Similar functions as Tool-Manager rate, applied to Agent Manager metrics
    • Purpose: Measures percentage of successful HTTP responses from the Agent Manager
  3. Pod Ready Status

    (sum by (organization, runner) (avg_over_time(kube_pod_status_ready{condition="true"}[5m]) 
     * on (pod) group_left(label_app_kubernetes_io_kubiya_runner_component) 
     kube_pod_labels{label_app_kubernetes_io_kubiya_runner_component!=""}) /
     count by (organization, runner) (kube_pod_labels{label_app_kubernetes_io_kubiya_runner_component!=""})) * 100
    
    • avg_over_time(): Smooths pod ready status over 5 minutes
    • * on (pod) group_left(): Joins metrics on pod label to include component information
    • Purpose: Calculates percentage of runner pods in "ready" state
  4. Pod Restart Stability

    (1 - clamp_max(sum by (organization, runner)(rate(kube_pod_container_status_restarts_total[5m]) 
     * on (pod) group_left(label_app_kubernetes_io_kubiya_runner_component) 
     kube_pod_labels{label_app_kubernetes_io_kubiya_runner_component!=""}) * 300 / 1.0, 1)) * 100
    
    • clamp_max(): Caps the maximum value at 1
    • * 300 / 1.0: Normalizes to consider 1 restart per 5 minutes (300s) as problematic
    • Purpose: Penalizes container restarts (0 restarts = 100%, 1+ restart per 5 minutes = 0%)
  5. Probe Success Rate

    avg by (organization, runner) (avg_over_time(probe_success{exporter="blackbox-exporter"}[5m])) * 100
    
    • avg by: Calculates average success rate by organization and runner
    • Purpose: Measures percentage of successful health endpoint probes from blackbox exporter

Health Thresholds

These thresholds are base and expected to be tuned in short term,

MetricHealthy (Green)Warning (Yellow)Degraded (Orange)Down (Red)
Cumulative Score100%99-99.9%90-98.9%0-89.9%

Alerts

The dashboard is connected to an alerting rule that triggers when any runner's cumulative health score falls below 100% for more than 5 minutes. The alert includes:

  • Source: Panel ID 17 from the All Runners Health State dashboard
  • Description: "C

Deploy kubiya-runner with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kubiya-runner 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 chartkubiya-runner is pinned at v0.9.4 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