Skip to content

Add StatefulSet workload support to CRUD benchmarking framework#1132

Draft
engineeredcurlz wants to merge 86 commits intomainfrom
dipowell/crud-statefulset
Draft

Add StatefulSet workload support to CRUD benchmarking framework#1132
engineeredcurlz wants to merge 86 commits intomainfrom
dipowell/crud-statefulset

Conversation

@engineeredcurlz
Copy link
Copy Markdown

Summary

Implements the statefulset workload type as the second of three planned workload methods (deployment, statefulset, jobs) in the CRUD benchmarking framework.

Changes

  • workload_templates/statefulset.yml — New Kubernetes manifest template for StatefulSets. Includes a headless Service (clusterIP: None) required for stable pod DNS, and uses STATEFULSET_REPLICAS placeholder distinct from the deployment template.

  • node_pool_crud.py — New create_statefulset() method following the same loop pattern as create_deployment. Uses ready instead of available as the wait condition since StatefulSets do not support the available condition type.

  • main.py — Added statefulset subparser with --node-pool-name, --number-of-statefulsets, --replicas, and --manifest-dir arguments. Added elif command == "statefulset" routing in handle_workload_operations.

  • steps/engine/crud/k8s/execute.yml — Added statefulset script block that calls python3 main.py statefulset with the appropriate CLI flags. Added number_of_statefulsets parameter.

  • steps/topology/k8s-crud-gpu/execute-crud.yml — Wires number_of_statefulsets through to the engine step.

Tests

4 unit tests added to test_azure_node_pool_crud.py:

  • test_create_statefulset_success — happy path, all StatefulSets succeed
  • test_create_statefulset_failure — all StatefulSets fail to become ready
  • test_create_statefulset_no_client — returns early when k8s client is unavailable
  • test_create_statefulset_partial_success — continues on individual failures, returns False on partial success

Dependencies

This branch is based on test-refactor and depends on it being merged before this can merge to main.

nginx-container was hardcoded in deployment template and in create deployment method

- add label_selector to parameters
- replace nginx-container in deployment.yaml (label_alue)
- derive label_value from selector
- pass label_selector directly
Uses ready condition instead of available
execute.yml script block that calls statefulset
Verify create_statefulset returns True when wait_for_condition returns True for all Statefulsets
verify create_statefulset returns False when wait_for_condition returns False for all StatefulSets
verify create_statefulset returns False when k8s_client is None and that create_template is never called, confirming the method returns early rather than failing later in execution.
verify create_statefulset returns False when only some StatefulSets succeed.
@engineeredcurlz engineeredcurlz force-pushed the dipowell/crud-statefulset branch from eb7d48b to e4f850b Compare April 16, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants