resilops-agent is the Kubernetes-side runtime for ResilOps resilience
validation. It runs inside a customer cluster, receives scenario work from the
ResilOps control plane, executes that work through
resilience-lib, and emits structured telemetry back to
the platform.
This repository is public because the execution model, RBAC scope, and cluster-side behavior should be inspectable. Contributions are welcome from engineers working on Kubernetes reliability, platform engineering, SRE, and release validation workflows.
The agent is responsible for the cluster-local parts of a resilience validation run:
- heartbeats to the control plane
- polling for queued resilience scenario claims
- fetching and executing scenario runs through
resilience-lib - namespace discovery snapshots
- leader election through Kubernetes
Leaseresources - forwarding event and metric telemetry through a Fluent Bit sidecar
In practice, this repo is the delivery and runtime layer around
resilience-lib. The library defines how scenarios execute. This agent handles
how that runtime is deployed, configured, authenticated, and operated inside a
cluster.
The public ResilOps repositories are split by responsibility:
resilience-lib: the scenario runtime and validation engineresilops-agent: the in-cluster worker that executes that runtimeresilience-web: the web application and control-plane-facing UI
That separation is intentional. It keeps the validation logic, the cluster runtime, and the product surface independently inspectable and easier to contribute to.
This project uses some of the same mechanisms as chaos engineering, but it is not the same discipline.
resilops-agent exists to run controlled, scenario-driven resilience
validation. The goal is not broad fault exploration or random disruption. The
goal is to gather repeatable evidence that a workload satisfies recovery and
reliability expectations with a bounded blast radius.
That distinction shows up in a few ways:
- runs are driven by explicit scenarios rather than open-ended experiments
- execution is gated by guardrails implemented in
resilience-lib - rollback and recovery verification are part of the expected workflow
- results are meant to support release readiness, drift detection, and operational confidence
- cluster permissions are scoped to the specific validation actions the agent must perform
If your goal is unrestricted production fault injection, large-scale game days, or exploratory chaos programs, that is adjacent work but not the focus of this repository.
src/agent/: application codehelm/agent/: Helm chart used to deploy the agentmockserver/: mock control plane for local developmentexamples/: example workloads and scenario payloadsdocker/: local image build inputs
- Python
>=3.12,<4.0 - Poetry
- a Kubernetes cluster for runtime testing
- Helm for chart rendering and installation
- access to a checkout of
../resilience-libfor local development workflows
The chart is published as an OCI artifact:
oci://ghcr.io/resilops/charts/agent
Example install:
helm install agent \
oci://ghcr.io/resilops/charts/agent \
--version 1.0.0 \
--namespace resilops \
--create-namespace \
--set existingSecret.name=resilops-agent-secrets \
--set-string envVar.data.RESILOPS_AGENT_CONFIG_VERSION=1.0.0 \
--set 'rbac.namespaced.namespaces={nginx,http-echo}'Example upgrade:
helm upgrade agent \
oci://ghcr.io/resilops/charts/agent \
--version 1.0.0 \
--namespace resilopsCluster operators still need to provide:
- OAuth client credentials in a Kubernetes secret
- the control plane URL for the target region
- the auth service URL for the target region
- the target namespaces the agent is allowed to operate in
Runtime settings are loaded from environment variables prefixed with
RESILOPS_AGENT_.
Required settings:
RESILOPS_AGENT_AUTH_SERVICE_HOSTRESILOPS_AGENT_AUTH_SERVICE_CLIENT_IDRESILOPS_AGENT_AUTH_SERVICE_CLIENT_SECRETRESILOPS_AGENT_CONTROL_PLANE_API_HOSTRESILOPS_AGENT_NAMESPACERESILOPS_AGENT_TARGET_NAMESPACESRESILOPS_AGENT_CONFIG_VERSION
Operational settings:
RESILOPS_AGENT_HEARTBEAT_INTERVALdefault30RESILOPS_AGENT_RUNNER_INTERVALdefault5RESILOPS_AGENT_RESILIENCY_SCENARIO_POLL_INTERVALdefault60RESILOPS_AGENT_NAMESPACE_SNAPSHOT_INTERVALdefault10800
Logging settings:
LOG_LEVELdefaultINFOLOG_FILEdefault/var/log/agent/agent.logLOG_MAX_MBdefault50LOG_BACKUP_COUNTdefault3
See helm/agent/values.yaml for chart defaults, region mappings, sidecar
configuration, and RBAC settings.
The Helm chart configures RBAC for:
- pods, including delete and patch operations
- pod evictions
- services
- EndpointSlices
- pod exec
- events
- deployments, including patch operations
- HorizontalPodAutoscalers
- PodDisruptionBudgets
- pod metrics from
metrics.k8s.io coordination.k8s.ioleasesin the agent namespace
The intention is not blanket cluster administration. The permissions are shaped around the specific disruption, observation, and recovery checks required by the current validation workflows.
This repository includes a local workflow for testing the agent against a mock control plane.
Useful commands:
make libmake buildmake secretsmake upmake downmake logsmake forwardmake examples-upmake examples-downmake tests
Supporting components:
mockserver/deployment.yaml: mock control plane for local testingexamples/: demo workloads and scenario payloads
Contributions are welcome, especially in areas such as:
- Kubernetes runtime hardening
- Helm chart improvements
- RBAC minimization and review
- telemetry and operability
- local development ergonomics
- documentation and examples
Before opening a larger pull request, start with an issue that explains the
problem, the proposed change, and any operational tradeoffs. That keeps changes
aligned across resilops-agent, resilience-lib, and the web/control-plane
surface.
When contributing:
- keep changes scoped to the agent or chart unless a cross-repo change is clearly required
- call out RBAC changes explicitly
- document behavior changes that affect operators or cluster permissions
- include tests where the change touches runtime behavior
helm/agent/values.yaml: chart defaults and region endpoint mappings.github/workflows/release.yaml: chart publication workflowDISTRIBUTION.md: current packaging and delivery notesLICENSE: repository license terms
Apache-2.0. See LICENSE.