Skip to content

Expose scheduler empty-workload propagation in Helm values #7572

@tamarubin

Description

@tamarubin

Problem

We hit a race condition during zero-replica transitions:

  • the source workload is updated to replicas=0,
  • while in parallel Karmada binding/work reconciliation may treat target changes as orphan cleanup and delete Work,
  • resulting in non-deterministic behavior during transitions (Work deleted vs expected zero-replica propagation).

In this scenario we need scheduler support for empty workloads to keep propagation behavior consistent when replicas are zero.

Today the Helm chart does not expose --enable-empty-workload-propagation, so enabling the behavior requires post-deploy patching in infrastructure code (Terraform null_resource + kubectl patch) just to add one scheduler flag.

Why this is painful

  • Race amplification: operational recovery from this race depends on external patching instead of a chart value.
  • Operational fragility: patch logic is outside Helm and can drift from chart state.
  • Upgrade risk: scheduler rollout/upgrade can remove the patched arg until patch logic re-runs.
  • Extra permissions/complexity: requires direct API patching and credential plumbing from IaC.
  • Harder troubleshooting: desired scheduler behavior is not declarative in Helm values.

Expected

Helm chart should provide a dedicated value, for example:

  • scheduler.enableEmptyWorkloadPropagation: false (default)
  • when enabled, render --enable-empty-workload-propagation=true in karmada-scheduler command args.

Context

PR with implementation:

If maintainers agree with this direction, we can iterate on naming/defaults as needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions