kubernetes-sigs / kubernetes-sigs/cluster-api

Paused behaviour is inconsistent

Open
#6,966 15 comments 2 reactions 0 assignees View on GitHub
help wanted kind/api-change kind/bug kind/cleanup priority/important-longterm triage/accepted
Dominant language
Go
Stars
4.3k
Forks
1.6k
Avg merge
1d 3h
Merged PRs (30d)
113

Description

**What steps did you take and what happened:**

In a MachineDeployment:
In the predicates we check cluster.Spec.Paused or the MachineDeployment has the annotation. We ignore MachineDeployment.Spec.Paused https://github.com/kubernetes-sigs/cluster-api/blob/main/internal/controllers/machinedeployment/machinedeployment_controller.go#L75-L97.

Then in the reconciling logic we first check the cluster.Spec.Paused or the MachineDeployment has the annotation. We ignore We ignore MachineDeployment.Spec.Paused https://github.com/kubernetes-sigs/cluster-api/blob/main/internal/controllers/machinedeployment/machinedeployment_controller.go#L126-L130

Then lines below we check only the MachineDeployment.Spec.Paused. We ignore cluster.Spec.Paused or the MachineDeployment has the annotation. https://github.com/kubernetes-sigs/cluster-api/blob/main/internal/controllers/machinedeployment/machinedeployment_controller.go#L225-L227

**What did you expect to happen:**
Always honour .spec.paused and fallback to the annotation for backward compatibility.
Introduce .spec.paused in MachineSets.
Review all CRDs to make the above consistent.

**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]

**Environment:**

- Cluster-api version:
- minikube/kind version:
- Kubernetes version: (use `kubectl version`):
- OS (e.g. from `/etc/os-release`):

/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]

Contributor guide

Open the contributing guide

Research direction

Start in internal/controllers/machinedeployment/machinedeployment_controller.go at the cited predicate and reconciliation sections, and compare how cluster.Spec.Paused, MachineDeployment.Spec.Paused, and the annotation are handled. Review the CRDs for the requested MachineSet field and related pause behavior. Done means spec.paused is consistently honored, with the annotation retained as a backward-compatible fallback.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.