Skip to content

[FEAT] - Enforce PayloadSchedulable condition check in Plugin controller #1967

@abhijith-darshan

Description

@abhijith-darshan

Priority

(Medium) I'm annoyed but I'll live

User Story

As a Greenhouse operator, I can onboard a workerless Gardener cluster (etcd-only, no worker nodes) and be confident that no plugin workloads will be scheduled onto it, so that the cluster is usable as an
etcd store without unintended plugin deployments.

Description

The cluster controller currently has two flaws when handling workerless clusters (Gardener clusters with no worker nodes):

  1. AllNodesReady=True is incorrect for workerless clusters. In reconcileNodeStatus, when the node list is empty the loop never executes, so the condition defaults to True. A cluster with zero nodes should not report AllNodesReady at all — the condition is misleading.
  2. PayloadSchedulable=False is not enforced in the Plugin controller. initClientGetter only gates on ReadyCondition. Since a workerless cluster can be Ready=True, Helm releases can be deployed to it even though no workloads can ever be scheduled. The PayloadSchedulable condition exists but is never consulted.

Acceptance Criteria

  • When a cluster has zero worker nodes, AllNodesReady condition is not set (or clearly reflects the workerless state rather than defaulting to True)
  • Plugin controller checks PayloadSchedulable — if False, plugin deployment is blocked and an appropriate condition is set on the Plugin
  • Existing unit and e2e tests for node cordon/unschedulable scenarios continue to pass
  • New unit test covers the workerless cluster path in reconcileNodeStatus

Reference Issues

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions