Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
877105f
Add StatefulSetSpecEditor tests
sourcehawk Mar 22, 2026
a20aaf4
Implement StatefulSet primitive package
sourcehawk Mar 22, 2026
dff7299
Add StatefulSet primitive documentation
sourcehawk Mar 22, 2026
ccbe198
Add StatefulSet primitive example
sourcehawk Mar 22, 2026
8054491
Fix formatting in statefulset mutator
sourcehawk Mar 22, 2026
f458085
commit statefulsetspec file
sourcehawk Mar 22, 2026
77f2693
Fix Copilot review comments on StatefulSet primitive
sourcehawk Mar 22, 2026
490c612
Fix comment typos in StatefulSet resource docs
sourcehawk Mar 22, 2026
90b402f
preserve server-managed metadata in default field applicator
sourcehawk Mar 22, 2026
d6a38e3
Skip VolumeClaimTemplate mutations on existing StatefulSets
sourcehawk Mar 22, 2026
1718512
Fix range variable pointer bug and align docs with implementation
sourcehawk Mar 23, 2026
25c31c6
Fix statefulset mutator constructor to not call beginFeature
sourcehawk Mar 23, 2026
cde2525
Add resource-level tests for StatefulSet primitive
sourcehawk Mar 23, 2026
227f800
Add PreserveStatus call to DefaultFieldApplicator
sourcehawk Mar 23, 2026
5657a88
Export BeginFeature() to satisfy FeatureMutator interface from main
sourcehawk Mar 23, 2026
65cd2c5
Merge remote-tracking branch 'origin/main' into feature/statefulset-p…
sourcehawk Mar 24, 2026
787cdf5
Add ObservedGeneration guard to StatefulSet DefaultConvergingStatusHa…
sourcehawk Mar 24, 2026
e851efd
Use deep-copied VolumeClaimTemplates in DefaultFieldApplicator
sourcehawk Mar 24, 2026
e9b9d12
Add StatefulSet primitive to shared documentation tables
sourcehawk Mar 24, 2026
27f6a63
Fix markdown table alignment in primitives.md
sourcehawk Mar 24, 2026
d7f0248
Address Copilot review: assert Build() errors and fix docstring
sourcehawk Mar 24, 2026
b0bc771
Use no-op Mutate function in WithMutation builder test
sourcehawk Mar 24, 2026
6578643
Add snapshot-based selector matching docs to EditContainers
sourcehawk Mar 24, 2026
ec8729d
Assert Build() errors in flavors_test.go subtests
sourcehawk Mar 24, 2026
1026007
Fix incorrect type name in statefulset example README
sourcehawk Mar 24, 2026
d1876e7
Add statefulset-primitive to run-examples Makefile target
sourcehawk Mar 24, 2026
b57c7e9
Merge remote-tracking branch 'origin/main' into feature/statefulset-p…
sourcehawk Mar 24, 2026
17f93a4
Do not initialize an empty plan on statefulset mutator construction
sourcehawk Mar 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ build-examples: ## Build all example binaries.
run-examples: ## Run all examples to verify they execute without error.
go run ./examples/deployment-primitive/.
go run ./examples/configmap-primitive/.
go run ./examples/statefulset-primitive/.
go run ./examples/custom-resource-implementation/.


Expand Down
24 changes: 13 additions & 11 deletions docs/primitives.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ This design:

Editors provide scoped, typed APIs for modifying specific parts of a resource:

| Editor | Scope |
| ---------------------- | ----------------------------------------------------------------------- |
| `ContainerEditor` | Environment variables, arguments, resource limits, ports |
| `PodSpecEditor` | Volumes, tolerations, node selectors, service account, security context |
| `DeploymentSpecEditor` | Replicas, update strategy, label selectors |
| `ConfigMapDataEditor` | `.data` entries — set, remove, deep-merge YAML patches, raw access |
| `ObjectMetaEditor` | Labels and annotations on any Kubernetes object |
| Editor | Scope |
| ----------------------- | ----------------------------------------------------------------------- |
| `ContainerEditor` | Environment variables, arguments, resource limits, ports |
| `PodSpecEditor` | Volumes, tolerations, node selectors, service account, security context |
| `DeploymentSpecEditor` | Replicas, update strategy, label selectors |
| `StatefulSetSpecEditor` | Replicas, service name, pod management policy, update strategy |
| `ConfigMapDataEditor` | `.data` entries — set, remove, deep-merge YAML patches, raw access |
| `ObjectMetaEditor` | Labels and annotations on any Kubernetes object |

Every editor exposes a `.Raw()` method for cases where the typed API is insufficient, giving direct access to the
underlying Kubernetes struct while keeping the mutation scoped to that editor's target.
Expand All @@ -151,10 +152,11 @@ have been applied. This means a single mutation can safely add a container and t

## Built-in Primitives

| Primitive | Category | Documentation |
| --------------------------- | -------- | ----------------------------------------- |
| `pkg/primitives/deployment` | Workload | [deployment.md](primitives/deployment.md) |
| `pkg/primitives/configmap` | Static | [configmap.md](primitives/configmap.md) |
| Primitive | Category | Documentation |
| ---------------------------- | -------- | ------------------------------------------- |
| `pkg/primitives/deployment` | Workload | [deployment.md](primitives/deployment.md) |
| `pkg/primitives/statefulset` | Workload | [statefulset.md](primitives/statefulset.md) |
| `pkg/primitives/configmap` | Static | [configmap.md](primitives/configmap.md) |

## Usage Examples

Expand Down
Loading
Loading