Skip to main content

Configuration Reference

This page provides a comprehensive reference for all PipeOps Kubernetes Agent configuration options. The agent can be configured using environment variables, a YAML configuration file, or Helm values.

Advanced Configuration

For advanced configuration scenarios and detailed examples, refer to the PipeOps Agent Documentation.

Environment Variables

Environment variables provide the simplest way to configure the agent, especially for containerized deployments.

Core Settings

VariableDescriptionRequiredDefault
PIPEOPS_TOKENYour PipeOps API authentication tokenYes-
CLUSTER_NAMEName for your cluster in PipeOpsNoAuto-generated
PIPEOPS_API_URLPipeOps API endpoint URLNohttps://api.pipeops.sh
PIPEOPS_ENDPOINTAlias for PIPEOPS_API_URLNohttps://api.pipeops.sh
NAMESPACEKubernetes namespace for agentNopipeops-system

Cluster Configuration

VariableDescriptionRequiredDefault
CLUSTER_TYPEKubernetes distribution to useNoauto
KUBERNETES_IN_CLUSTERRunning inside Kubernetes clusterNotrue
KUBECONFIGPath to kubeconfig fileNo~/.kube/config
AUTO_INSTALL_COMPONENTSAuto-install monitoring/cluster componentsNotrue (bash), false (Helm)

Valid CLUSTER_TYPE values: auto, k3s, minikube, k3d, kind, existing

Gateway Proxy Configuration

VariableDescriptionRequiredDefault
ENABLE_INGRESS_SYNCEnable gateway proxy ingress watchingNotrue
GATEWAY_PROXY_ENABLEDAlias for ENABLE_INGRESS_SYNCNotrue
Gateway Proxy

Gateway proxy is enabled by default and automatically detects cluster type (public vs private) to optimize routing. Direct routing for public clusters (3-5x faster), tunnel routing for private clusters.

Monitoring Configuration

VariableDescriptionRequiredDefault
DISABLE_MONITORINGDisable monitoring stack installationNofalse
PIPEOPS_MONITORING_ENABLEDEnable monitoring stackNotrue
PIPEOPS_PROMETHEUS_ENABLEDEnable PrometheusNotrue
PIPEOPS_GRAFANA_ENABLEDEnable GrafanaNotrue
PIPEOPS_LOKI_ENABLEDEnable LokiNotrue
PIPEOPS_GRAFANA_SUB_PATHEnable Grafana sub-path routingNotrue

Resource Limits

VariableDescriptionRequiredDefault
PIPEOPS_CPU_LIMITCPU limit for agentNo500m
PIPEOPS_MEMORY_LIMITMemory limit for agentNo512Mi
PIPEOPS_CPU_REQUESTCPU request for agentNo250m
PIPEOPS_MEMORY_REQUESTMemory request for agentNo256Mi

Security Settings

VariableDescriptionRequiredDefault
PIPEOPS_TLS_ENABLEDEnable TLS for API communicationNotrue
PIPEOPS_TLS_INSECURE_SKIP_VERIFYSkip TLS certificate verificationNofalse
PIPEOPS_RBAC_ENABLEDEnable Kubernetes RBACNotrue

Logging Configuration

VariableDescriptionRequiredDefault
LOG_LEVELLogging levelNoinfo
LOG_FORMATLog output formatNojson
LOG_OUTPUTLog output destinationNostdout

Valid LOG_LEVEL values: debug, info, warn, error, fatal Valid LOG_FORMAT values: json, text

Tunnel Configuration

VariableDescriptionRequiredDefault
TUNNEL_ENABLEDEnable secure tunnelingNotrue
TUNNEL_INACTIVITY_TIMEOUTTunnel inactivity timeoutNo5m

Connection Settings

VariableDescriptionRequiredDefault
PIPEOPS_TIMEOUTAPI request timeoutNo30s
PIPEOPS_RECONNECT_ENABLEDEnable automatic reconnectionNotrue
PIPEOPS_RECONNECT_MAX_ATTEMPTSMax reconnection attemptsNo10
PIPEOPS_RECONNECT_INTERVALReconnection intervalNo5s
PIPEOPS_RECONNECT_BACKOFFReconnection backoff durationNo5s

YAML Configuration File

For more complex configurations, use a YAML file. The default location is /etc/pipeops/config.yaml or specified with --config flag.

Complete Configuration Example

# Complete agent configuration example
agent:
# Unique agent identifier (auto-generated if not specified)
id: ""

# Agent name shown in PipeOps dashboard
name: "pipeops-agent"

# Cluster name for identification in PipeOps
cluster_name: "production-cluster"

# Enable Grafana sub-path routing for ingress
grafana_sub_path: true

# Enable gateway proxy for ingress route management (default: true)
enable_ingress_sync: true

# Auto-install monitoring/cluster components (bash: true, Helm: false)
autoInstallComponents: false

# Custom labels for the agent
labels:
environment: "production"
region: "us-east-1"
team: "platform"
managed-by: "pipeops"

# PipeOps platform configuration
pipeops:
# PipeOps API URL
api_url: "https://api.pipeops.sh"

# Your cluster authentication token
token: "your-cluster-token-here"

# API request timeout
timeout: "30s"

# Reconnection configuration
reconnect:
enabled: true
max_attempts: 10
interval: "5s"
backoff: "5s"

# TLS configuration
tls:
enabled: true
insecure_skip_verify: false
# Optional: custom CA certificate
# ca_cert: /path/to/ca.crt
# client_cert: /path/to/client.crt
# client_key: /path/to/client.key

# Tunnel configuration for secure cluster access
tunnel:
enabled: true
inactivity_timeout: "5m"

# Port forwards for cluster access
forwards:
- name: "kubernetes-api"
local_addr: "localhost:6443"
remote_port: 0 # Auto-assigned

- name: "kubelet-metrics"
local_addr: "localhost:10250"
remote_port: 0

- name: "agent-http"
local_addr: "localhost:8080"
remote_port: 0

- name: "prometheus"
local_addr: "localhost:9090"
remote_port: 0

- name: "grafana"
local_addr: "localhost:3000"
remote_port: 0

# Kubernetes cluster configuration
kubernetes:
# Whether agent is running inside cluster
in_cluster: true

# Namespace for agent resources
namespace: "pipeops-system"

# Path to kubeconfig (if not in-cluster)
kubeconfig: ""

# Kubernetes API server URL (if not in-cluster)
# master: "https://kubernetes.default.svc"

# Logging configuration
logging:
# Log level: debug, info, warn, error, fatal
level: "info"

# Log format: json, text
format: "json"

# Log output: stdout, stderr, or file path
output: "stdout"

# Optional: log file path if output is a file
# file: "/var/log/pipeops/agent.log"

# Optional: enable structured logging
structured: true

# Monitoring stack configuration
monitoring:
enabled: true

# Namespace for monitoring components
namespace: "pipeops-monitoring"

# Prometheus configuration
prometheus:
enabled: true
port: 9090
retention: "15d"
storage_size: "10Gi"
scrape_interval: "30s"

# Resource limits
resources:
requests:
cpu: "250m"
memory: "512Mi"
limits:
cpu: "500m"
memory: "1Gi"

# Grafana configuration
grafana:
enabled: true
port: 3000
admin_password: "changeme"
persistence:
enabled: true
size: "5Gi"

# Resource limits
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "200m"
memory: "256Mi"

# Loki configuration
loki:
enabled: true
port: 3100
retention: "168h" # 7 days
storage_size: "10Gi"

# Resource limits
resources:
requests:
cpu: "100m"
memory: "256Mi"
limits:
cpu: "200m"
memory: "512Mi"

# OpenCost configuration
opencost:
enabled: true
port: 9003

# Agent resource limits
resources:
requests:
cpu: "250m"
memory: "256Mi"
limits:
cpu: "500m"
memory: "512Mi"

# Security context for agent pod
security:
# Run as non-root user
run_as_non_root: true
run_as_user: 1000
run_as_group: 1000
fs_group: 1000

# Security capabilities
capabilities:
drop:
- ALL
add:
- NET_BIND_SERVICE

# Read-only root filesystem
read_only_root_filesystem: true

# Health check configuration
health:
# Health check endpoint port
port: 8081

# Liveness probe configuration
liveness:
initial_delay_seconds: 10
period_seconds: 10
timeout_seconds: 5
failure_threshold: 3

# Readiness probe configuration
readiness:
initial_delay_seconds: 5
period_seconds: 5
timeout_seconds: 3
failure_threshold: 3

# Metrics configuration
metrics:
enabled: true
port: 9091
path: "/metrics"

Helm Values

When using Helm for installation, configure the agent using a values.yaml file.

Basic Helm Values

# values.yaml - Basic configuration
agent:
cluster:
name: "my-cluster"

pipeops:
token: "your-api-token"
apiUrl: "https://api.pipeops.sh"

image:
repository: ghcr.io/pipeopshq/pipeops-k8-agent
tag: "latest"
pullPolicy: IfNotPresent

resources:
requests:
cpu: "250m"
memory: "256Mi"
limits:
cpu: "500m"
memory: "512Mi"

monitoring:
enabled: true
namespace: "pipeops-monitoring"

Production Helm Values

# values.yaml - Production configuration
agent:
cluster:
name: "production-cluster"
labels:
environment: production
region: us-east-1

pipeops:
token: "your-api-token"
apiUrl: "https://api.pipeops.sh"
timeout: "30s"
reconnect:
enabled: true
maxAttempts: 10
interval: "5s"

image:
repository: ghcr.io/pipeopshq/pipeops-k8-agent
tag: "v1.2.3" # Use specific version in production
pullPolicy: IfNotPresent

resources:
requests:
cpu: "500m"
memory: "512Mi"
limits:
cpu: "1000m"
memory: "1Gi"

# Pod security context
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
capabilities:
drop:
- ALL

# High availability
replicas: 1 # Agent doesn't support HA yet

# Pod disruption budget
podDisruptionBudget:
enabled: true
minAvailable: 1

# Monitoring stack configuration
monitoring:
enabled: true
namespace: "pipeops-monitoring"

prometheus:
enabled: true
retention: "30d"
persistence:
enabled: true
storageClass: "standard"
size: "50Gi"
resources:
requests:
cpu: "500m"
memory: "1Gi"
limits:
cpu: "1000m"
memory: "2Gi"
alerting:
enabled: true

grafana:
enabled: true
adminPassword: "secure-password-here"
persistence:
enabled: true
storageClass: "standard"
size: "10Gi"
ingress:
enabled: true
className: "nginx"
hosts:
- host: grafana.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: grafana-tls
hosts:
- grafana.example.com
resources:
requests:
cpu: "200m"
memory: "256Mi"
limits:
cpu: "500m"
memory: "512Mi"

loki:
enabled: true
retention: "720h" # 30 days
persistence:
enabled: true
storageClass: "standard"
size: "100Gi"
resources:
requests:
cpu: "200m"
memory: "512Mi"
limits:
cpu: "500m"
memory: "1Gi"

opencost:
enabled: true
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "200m"
memory: "256Mi"

# Network policy
networkPolicy:
enabled: true
policyTypes:
- Ingress
- Egress

# Service account
serviceAccount:
create: true
annotations: {}
name: "pipeops-agent"

# RBAC
rbac:
create: true

# Node selector
nodeSelector: {}

# Tolerations
tolerations: []

# Affinity rules
affinity: {}

Configuration Validation

Validate YAML Configuration

Use the agent's built-in validation:

pipeops-agent validate --config /etc/pipeops/config.yaml

Validate Helm Values

helm lint pipeops/pipeops-agent -f values.yaml

Test Configuration

Dry-run installation to test configuration:

helm install pipeops-agent pipeops/pipeops-agent \
-f values.yaml \
--dry-run --debug

Configuration Best Practices

Security

  1. Never commit tokens to version control

    • Use Kubernetes secrets or external secret management
    • Rotate tokens regularly
  2. Use TLS for all connections

    pipeops:
    tls:
    enabled: true
    insecure_skip_verify: false
  3. Enable RBAC

    rbac:
    create: true
  4. Run as non-root

    security:
    run_as_non_root: true
    run_as_user: 1000

Resource Management

  1. Set appropriate resource limits

    resources:
    requests:
    cpu: "250m"
    memory: "256Mi"
    limits:
    cpu: "500m"
    memory: "512Mi"
  2. Enable monitoring to track resource usage

    monitoring:
    enabled: true
  3. Use persistent storage for monitoring data

    monitoring:
    prometheus:
    persistence:
    enabled: true
    size: "50Gi"

High Availability

  1. Use specific image tags

    image:
    tag: "v1.2.3" # Not "latest"
  2. Configure pod disruption budgets

    podDisruptionBudget:
    enabled: true
    minAvailable: 1
  3. Enable automatic reconnection

    pipeops:
    reconnect:
    enabled: true
    max_attempts: 10

Monitoring

  1. Retain metrics for adequate duration

    monitoring:
    prometheus:
    retention: "30d"
  2. Configure appropriate scrape intervals

    monitoring:
    prometheus:
    scrape_interval: "30s"
  3. Enable persistent storage

    monitoring:
    prometheus:
    persistence:
    enabled: true

Next Steps