← Back to Pull requests

feat(spark-operator-module): add durable controller tuning knobs #215

Closed
unknown closed this pull request without merging on Oct 31, 2026 00:00 UTC
View on GitHub
unknown unknown commented on Oct 28, 2026 21:22 UTC
Author

Purpose of this PR

Adds durable Spark Operator controller tuning through the platform-managed SparkOperator custom resource.

Previously, controller workers, workqueue settings, and Kubernetes API client limits could only be changed by patching the managed Deployment. The Spark Operator module could reconcile those changes back to the rendered defaults.

Proposed changes:

  • Add spec.spark.controllerConfiguration fields for:

  • - Controller workers
    - Workqueue bucket QPS, bucket size, and maximum-delay enable/duration
    - Kubernetes API client QPS and burst
  • Apply configured values to the rendered spark-operator-controller Deployment during reconciliation.

  • Preserve rendered defaults when individual fields are omitted.

  • Add unit and integration tests covering API resolution and Deployment argument rendering.

  • Regenerate the SparkOperator CRD and deep-copy code.

  • Document the new custom-resource configuration.
  • Change Category

  • Bugfix (non-breaking change which fixes an issue)

  • Feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that could affect existing functionality)

  • Documentation update
  • Rationale

    The Spark Operator module owns and continuously reconciles the controller Deployment. Direct Deployment patches are therefore not a durable way to configure controller behavior.

    Exposing these settings through the SparkOperator CR makes them part of the module's desired state. Controller restarts and subsequent module reconciliations preserve the configured values.

    All fields are optional, maintaining backward compatibility for existing custom resources. The field layout follows the upstream Helm values used by the Spark Operator benchmarking guide.

    Checklist

  • I have conducted a self-review of my own code.

  • I have updated documentation accordingly.

  • I have added tests that prove my changes are effective or that my feature works.

  • Existing unit tests pass locally with my changes.
  • Additional Notes

    Example configuration:

    spec:
      managementState: Managed
      spark:
        controllerConfiguration:
          workers: 20
          workqueueRateLimiter:
            bucketQPS: 50
            bucketSize: 500
            maxDelay:
              enabled: true
              duration: 6h
          kubeAPIQPS: 20
          kubeAPIBurst: 30
    

    Diff: 294 lines (+220 / -74) across 3 files Reviewer: RobuRishabh Review duration: 3037m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 294 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.340
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #215"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.9% (MEDIUM) · Higher = larger blast radius
    39.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.8% · Safe to merge
    15.8%