Transform any workflow into a production-grade Kubernetes operator without writing code.
FlowOps is a Kubernetes operator platform that enables building operators using declarative YAML workflows instead of writing Go code. Define your operator logic as simple workflow steps, and FlowOps handles the rest.
- Declarative Workflows: Define operators using YAML workflows, no Go code required
- Dynamic Controller Spawning: Automatically creates and manages controllers for each Flow
- Built-in Step Executors: kubectl, script (bash/python), template (Helm/Kustomize), HTTP
- Advanced Error Handling: Configurable retry policies, exponential backoff, conditional retries
- Template System: Go template-based variable substitution with access to resource fields
- Hot Reloading: Update Flows without restarting the controller
- GitOps Ready: Version control your operator definitions alongside your infrastructure
- Kubernetes 1.20+
- kubectl configured
# Install FlowOps engine
kubectl apply -k config/default
# Verify installation
kubectl get pods -n flowops-system- Define a target CRD (the resource your operator will manage):
# database-crd.yamlapiVersion: apiextensions.k8s.io/v1kind: CustomResourceDefinitionmetadata:
name: databases.example.comspec:
group: example.comnames:
kind: Databaseplural: databasesscope: Namespacedversions:
- name: v1served: truestorage: trueschema:
openAPIV3Schema:
type: objectproperties:
spec:
type: objectproperties:
engine:
type: stringreplicas:
type: integer- Create a Flow (your operator logic):
# database-flow.yamlapiVersion: flowops.io/v1kind: Flowmetadata:
name: database-operatorspec:
watch:
apiVersion: example.com/v1kind: Databasereconcile:
steps:
- name: create-statefulsettype: kubectlaction: applymanifests: | apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ .Resource.metadata.name }} namespace: {{ .Resource.metadata.namespace }} spec: serviceName: {{ .Resource.metadata.name }} replicas: {{ .Resource.spec.replicas }} selector: matchLabels: app: {{ .Resource.metadata.name }} template: metadata: labels: app: {{ .Resource.metadata.name }} spec: containers: - name: database image: {{ .Resource.spec.engine }}:latest- Deploy and test:
# Install the CRD
kubectl apply -f database-crd.yaml
# Install the Flow
kubectl apply -f database-flow.yaml
# Create a database instance
kubectl apply -f - <<EOFapiVersion: example.com/v1kind: Databasemetadata: name: my-postgresspec: engine: postgres replicas: 3EOF# Watch your operator in action
kubectl get flows
kubectl get databases
kubectl get statefulsets┌─────────────────────────────────────────────────────────────┐
│ FlowOps Engine │
├─────────────────────────────────────────────────────────────┤
│ Flow Watcher (Meta-Controller) │
│ ↓ │
│ Flow Registry │
│ ↓ │
│ Dynamic Controller Manager │
│ ↓ │
│ Workflow Execution Engine │
│ ↓ │
│ Step Executors (kubectl, script, template, http) │
└─────────────────────────────────────────────────────────────┘
A Flow defines:
- watch: Which Kubernetes resource to watch
- reconcile: Workflow steps to execute on changes
- onDelete: Cleanup steps when resource is deleted (optional)
- onError: Error handling workflow (optional)
Execute Kubernetes operations:
- name: apply-resourcestype: kubectlaction: applymanifests: | # Your Kubernetes manifests hereRun bash or python scripts:
- name: validatetype: scriptscript: | #!/bin/bash if [[ {{ .Resource.spec.replicas }} -lt 1 ]]; then echo "ERROR: replicas must be >= 1" exit 1 fiRender Helm charts or Kustomize:
- name: render-charttype: templateengine: helmchart: ./charts/my-appvalues:
replicas: {{ .Resource.spec.replicas }}Make HTTP requests:
- name: webhooktype: httpurl: https://api.example.com/provisionmethod: POSTbody:
name: {{ .Resource.metadata.name }}Access resource fields in your workflows:
# Resource metadata{{ .Resource.metadata.name }}{{ .Resource.metadata.namespace }}# Resource spec{{ .Resource.spec.replicas }}{{ .Resource.spec.engine }}# Step outputs{{ steps.previous-step.outputs.key }}# Current time{{ .Now }}Configure retry behavior per step:
steps:
- name: create-resourcetype: kubectlaction: applymanifests: | # ...errorHandling:
type: retryable # permanent | temporary | retryablemaxRetries: 5backoff: exponential # fixed | linear | exponentialretryDelay: "1s"timeout: "5m"retryOn:
- statusCode: 429# Retry on rate limit
- statusCode: 503# Retry on service unavailablefailOn:
- statusCode: 400# Don't retry bad requests# List Flows
kubectl get flows
kubectl get fl # short form# Describe a Flow
kubectl describe flow database-operator
# View FlowOps engine logs
kubectl logs -n flowops-system -l app=flowops-engine --tail=100 -f
# Edit a Flow (hot-reload)
kubectl edit flow database-operator
# Delete a Flow
kubectl delete flow database-operatorCheck out the examples/ directory for complete operator examples:
- database-operator: Simple database operator using StatefulSets
- More examples coming soon!
# Clone repository
git clone https://github.com/flowops-io/flowops-engine.git
cd flowops-engine
# Install dependencies
go mod download
# Build binary
make build
# Run tests
make test# Build Docker image
make docker-build IMG=flowops-engine:dev# Install CRDs
make install
# Run controller locally (against your kubeconfig cluster)
make run
# Deploy to cluster
make deploy IMG=flowops-engine:dev
# Undeploy
make undeploy# Deploy database operator example
make example-db
# Create test database
make example-db-test
# Clean up
make example-db-cleanflowops-engine/
├── cmd/manager/ # Main entry point
├── pkg/
│ ├── apis/flow/v1/ # Flow CRD types
│ ├── controller/ # Meta-controller and dynamic controllers
│ ├── registry/ # Flow registry
│ ├── engine/ # Workflow execution engine
│ ├── executor/ # Step executors
│ └── utils/ # Utilities
├── config/
│ ├── crd/ # CRD manifests
│ ├── rbac/ # RBAC configurations
│ ├── manager/ # Deployment manifests
│ └── default/ # Kustomize config
├── examples/ # Example operators
├── Makefile # Build automation
└── Dockerfile # Container image
- ✅ Core Flow CRD
- ✅ Dynamic controller spawning
- ✅ Basic executors: kubectl, script
- ✅ Simple error handling and retries
- ✅ Basic templating system
- template executor (Helm, Kustomize)
- http executor
- Advanced error handling (retryOn, failOn)
- Step outputs and chaining
- Conditional step execution
- Comprehensive validation
- Metrics and observability (Prometheus)
- Flow admission webhooks
- Performance optimizations
- HA support (leader election)
- Visual Flow editor (UI)
- Plugin system for custom executors
- GitOps integration (Argo CD, Flux)
- Multi-cluster support
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Apache License 2.0
- GitHub Issues: https://github.com/flowops-io/flowops-engine/issues
- Documentation: https://docs.flowops.io (coming soon)
- Community: Join us on Kubernetes Slack #flowops (coming soon)
FlowOps - Making Kubernetes operators as simple as YAML workflows