Skip to content

Commit a04bcc5

Browse files
committed
feat: rewrite operator — new CRDs, controllers, webhooks, storage, streaming, and CI
Rewrite the bobrapet operator with new API groups, controllers, webhooks, and runtime infrastructure. API surface: - Add runs.bubustack.io group (StoryRun, StepRun, StoryTrigger, EffectClaim, Trace, StructuredError, Schema types) - Add catalog.bubustack.io group (shared template types) - Add transport.bubustack.io settings types - Add policy.bubustack.io ReferenceGrant - Extend core CRDs (Story, Engram, Impulse) with execution overrides, schemas, and streaming configuration Controllers and webhooks: - StoryRun DAG reconciler with parallel-by-default execution - StepRun controller with Job/Deployment/StatefulSet modes - StoryTrigger controller with durable admission and dedup - EffectClaim controller for reservation semantics - Engram and Impulse controllers with template resolution - Transport and TransportBinding controllers - Admission webhooks for all mutable CRDs - RBAC manager for per-StoryRun scoped permissions Runtime: - Storage offloading (S3-compatible) with inline/ref switching - Template expression evaluation with Sprig functions - In-process offloaded data resolution (controller mode) - Operator configuration via ConfigMap with chain resolution - Structured error contract for step failures - OpenTelemetry tracing integration Infrastructure: - Kustomize manifests, RBAC, cert-manager, webhooks - Helm chart generation via helmify - GitHub Actions CI (lint, test, e2e, docker, release-please) - Community health files (CoC, Security, Support, Contributing) - Dependabot with grouped updates
1 parent c791cba commit a04bcc5

394 files changed

Lines changed: 98325 additions & 2220 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "Kubebuilder DevContainer",
3-
"image": "golang:1.25",
3+
"image": "docker.io/golang:1.25-bookworm",
44
"features": {
5-
"ghcr.io/devcontainers/features/docker-in-docker:2": {
5+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
66
"moby": false,
77
"dockerDefaultAddressPool": "base=172.30.0.0/16,size=24"
88
},
@@ -12,7 +12,9 @@
1212
}
1313
},
1414

15-
"runArgs": ["--privileged", "--init"],
15+
"forwardPorts": [8080, 8443],
16+
17+
"runArgs": ["--privileged", "--init", "--network=host"],
1618

1719
"customizations": {
1820
"vscode": {

.devcontainer/post-install.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ if ! command -v kubectl &> /dev/null; then
9090
echo "kubectl installed successfully"
9191
fi
9292

93+
# Install helm
94+
if ! command -v helm &> /dev/null; then
95+
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
96+
fi
97+
9398
# Generate kubectl bash completion
9499
if command -v kubectl &> /dev/null; then
95100
if kubectl completion bash > "${BASH_COMPLETIONS_DIR}/kubectl" 2>/dev/null; then
@@ -142,6 +147,7 @@ echo "------------------------------------"
142147
kind version
143148
kubebuilder version
144149
kubectl version --client
150+
helm version
145151
docker --version
146152
go version
147153

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
".": "0.1.1"
3+
}
4+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: "Bug report"
3+
about: "Report a reproducible issue in an operator, transport, SDK, Engram, or Impulse"
4+
labels: ["kind/bug", "status/triage"]
5+
---
6+
7+
## Component(s)
8+
- [ ] bobrapet (Story/StoryRun controllers)
9+
- [ ] bobravoz-grpc (transport operator)
10+
- [ ] bubu-sdk-go
11+
- [ ] Engram (name it below)
12+
- [ ] Impulse (name it below)
13+
- [ ] Docs / website
14+
15+
If Engram/Impulse:
16+
```
17+
name:
18+
version/tag:
19+
execution mode (job / deployment / statefulset):
20+
```
21+
22+
## What happened?
23+
Tell us what broke. Include the Story/StoryRun status, the expected behaviour, and what you observed instead.
24+
25+
## Minimal reproduction
26+
1. Inputs/Story snippet (YAML or JSON)
27+
2. Commands you ran (`kubectl`, `make`, etc.)
28+
3. Cluster details (Kubernetes version, Kind/Minikube/managed cluster)
29+
30+
```
31+
apiVersion: stories.bubustack.io/v1alpha1
32+
kind: Story
33+
metadata:
34+
name: example
35+
spec:
36+
...
37+
```
38+
39+
## Logs & traces
40+
- `kubectl logs` for controllers or Engrams (set `BUBU_DEBUG=true` if possible)
41+
- Relevant excerpts from `storyrun` / `steprun` status
42+
- TransportBinding / bobravoz logs if streaming is impacted
43+
44+
## Additional context
45+
Anything else we should know? For example, custom overrides, secrets/providers, or recent upgrades.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security reports
4+
url: https://github.com/bubustack/bobrapet/security/advisories/new
5+
about: Please use our private reporting channel for vulnerabilities.
6+
- name: Architecture & roadmap discussions
7+
url: https://github.com/orgs/bubustack/discussions
8+
about: For proposals that span multiple repositories, start a discussion before opening issues.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: "Docs / community update"
3+
about: "Request a documentation, support, or example update"
4+
labels: ["kind/docs", "status/triage"]
5+
---
6+
7+
## Area
8+
- [ ] Operator docs / architecture
9+
- [ ] Engram or Impulse README (name it)
10+
- [ ] SDK reference (Go examples)
11+
- [ ] Website / tutorials / blog
12+
- [ ] Community health file (Code of Conduct, Security, Support, etc.)
13+
14+
## What needs to change?
15+
Link to the existing page/file and tell us what is missing or incorrect.
16+
17+
## Source of truth
18+
Add the CRD, code snippet, or log output that proves the correct behaviour so we can update the doc with confidence.
19+
20+
## Suggested fix (optional)
21+
Share wording, diagrams, or commands that would resolve the issue.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: "Feature request"
3+
about: "Pitch a new capability for the operator, transport, SDK, Engram, or docs"
4+
labels: ["kind/feature", "status/triage"]
5+
---
6+
7+
## Problem statement
8+
What workflow or operational gap are you trying to solve? Include scale, latency, tenancy, or compliance constraints if relevant.
9+
10+
## Proposed change
11+
Describe the behaviour you’d like to see. If this affects CRDs, Engram templates, or SDK APIs, list the new fields and defaults.
12+
13+
```
14+
apiVersion: catalog.bubustack.io/v1alpha1
15+
kind: EngramTemplate
16+
spec:
17+
with:
18+
newField: ...
19+
```
20+
21+
## Affected component(s)
22+
- [ ] bobrapet
23+
- [ ] bobravoz-grpc
24+
- [ ] bubu-sdk-go
25+
- [ ] Engram (name it)
26+
- [ ] Impulse (name it)
27+
- [ ] Docs / website
28+
29+
## Alternatives considered
30+
What did you try already? Examples: custom Engram, Go Templates, external controller, different transport, etc.
31+
32+
## Additional context
33+
Links, design docs, screenshots, or related issues/discussions.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Summary
2+
<!-- What does this PR change and why? -->
3+
4+
## Type of change
5+
- [ ] Bug fix
6+
- [ ] New feature
7+
- [ ] Breaking change
8+
- [ ] Documentation / examples
9+
- [ ] Refactor / chore
10+
11+
## Related issues
12+
<!-- Link issues (e.g., Fixes #123) -->
13+
14+
## How was this tested?
15+
- [ ] Unit tests
16+
- [ ] Integration tests
17+
- [ ] E2E / Kind tests
18+
- [ ] Manual verification
19+
Commands / notes:
20+
```bash
21+
# paste commands you ran (or explain why not)
22+
```
23+
24+
## Docs / CRDs impact
25+
- [ ] Docs updated (README/Guides/Support)
26+
- [ ] CRD or Engram/Impulse schema changes
27+
- [ ] Not applicable
28+
29+
## Checklist
30+
- [ ] Lint/tests ran locally
31+
- [ ] Updated Engram.yaml/CRDs/manifests when behaviour changed
32+
- [ ] Added changelog/release note if required
33+
- [ ] No secrets or sensitive data committed

.github/dependabot.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
version: 2
2+
updates:
3+
# Go module dependencies
4+
- package-ecosystem: "gomod"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
open-pull-requests-limit: 10
10+
groups:
11+
kubernetes:
12+
patterns:
13+
- "k8s.io/*"
14+
- "sigs.k8s.io/*"
15+
opentelemetry:
16+
patterns:
17+
- "go.opentelemetry.io/*"
18+
grpc:
19+
patterns:
20+
- "google.golang.org/grpc"
21+
- "google.golang.org/protobuf"
22+
bubustack:
23+
patterns:
24+
- "github.com/bubustack/*"
25+
labels:
26+
- "dependencies"
27+
- "go"
28+
29+
# GitHub Actions
30+
- package-ecosystem: "github-actions"
31+
directory: "/"
32+
schedule:
33+
interval: "weekly"
34+
day: "monday"
35+
open-pull-requests-limit: 5
36+
labels:
37+
- "dependencies"
38+
- "github-actions"
39+
40+
# Docker base images
41+
- package-ecosystem: "docker"
42+
directory: "/"
43+
schedule:
44+
interval: "weekly"
45+
day: "monday"
46+
open-pull-requests-limit: 5
47+
labels:
48+
- "dependencies"
49+
- "docker"
50+

.github/labels.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
- name: "kind/bug"
2+
color: "d73a4a"
3+
description: "Unexpected behaviour or regression that needs fixing."
4+
- name: "kind/feature"
5+
color: "0e8a16"
6+
description: "New functionality or enhancement request."
7+
- name: "kind/docs"
8+
color: "c5def5"
9+
description: "Documentation, examples, or community health updates."
10+
- name: "kind/refactor"
11+
color: "5319e7"
12+
description: "Code health, cleanup, or non-functional improvements."
13+
- name: "kind/tests"
14+
color: "fbca04"
15+
description: "Testing, CI, or verification-only changes."
16+
- name: "kind/chore"
17+
color: "bfd4f2"
18+
description: "Maintenance, dependency bumps, or release automation."
19+
- name: "dependencies"
20+
color: "0366d6"
21+
description: "Dependency updates raised by automation such as Dependabot."
22+
- name: "area/operator"
23+
color: "0b4f6c"
24+
description: "Bobrapet controller or CRD-level change."
25+
- name: "area/transport"
26+
color: "0b4f6c"
27+
description: "Bobravoz gRPC transport changes."
28+
- name: "area/sdk"
29+
color: "0b4f6c"
30+
description: "Bubu SDK or shared runtime work."
31+
- name: "area/engram"
32+
color: "0b4f6c"
33+
description: "Specific Engram implementation or template change."
34+
- name: "area/impulse"
35+
color: "0b4f6c"
36+
description: "Impulse templates, webhook ingestion, or trigger paths."
37+
- name: "area/docs"
38+
color: "0b4f6c"
39+
description: "Docs site, READMEs, or knowledge base updates."
40+
- name: "priority/critical"
41+
color: "b60205"
42+
description: "Production-impacting issue that needs immediate attention."
43+
- name: "priority/high"
44+
color: "d93f0b"
45+
description: "Important issue to schedule soon."
46+
- name: "priority/medium"
47+
color: "fbca04"
48+
description: "Normal priority item."
49+
- name: "priority/low"
50+
color: "cfd3d7"
51+
description: "Nice-to-have or backlog item."
52+
- name: "status/triage"
53+
color: "ededed"
54+
description: "Issue has not been reviewed yet."
55+
- name: "status/needs-info"
56+
color: "f9d0c4"
57+
description: "Waiting on more information from the reporter."
58+
- name: "status/in-progress"
59+
color: "004d99"
60+
description: "Actively being worked on."
61+
- name: "status/blocked"
62+
color: "5319e7"
63+
description: "Blocked on another issue, dependency, or external signal."
64+
- name: "status/ready"
65+
color: "28a745"
66+
description: "Ready to merge/release once tests pass."
67+
- name: "good first issue"
68+
color: "7057ff"
69+
description: "Small, well-scoped tasks for new contributors."
70+
- name: "help wanted"
71+
color: "008672"
72+
description: "Looking for community contributions."
73+
- name: "triage/needs-owner"
74+
color: "5319e7"
75+
description: "Needs someone to own or shepherd the fix."

0 commit comments

Comments
 (0)