feat(shoot): set workerless annotation on secret for workerless shoots - #79
Conversation
…orkerless shoots On-behalf-of: @SAP krzysztof.zagorski@sap.com Signed-off-by: Zaggy21 <k.zaggy@gmail.com>
There was a problem hiding this comment.
🟢 Approval recommended
The change is localized, matches the stated behavior in the PR description, and includes targeted tests for both setting and removing the workerless annotation.
Pull request overview
This PR extends the Shoot reconciliation flow to detect “workerless” Gardener Shoots (no spec.provider.workers) and reflect that state on the generated Greenhouse cluster Secret via the greenhouse.sap/workerless: "true" annotation, which is then used downstream by the Greenhouse bootstrap controller to switch cluster mode and gate scheduling/plugin rollout.
Changes:
- Annotate the Greenhouse cluster Secret with
greenhouse.sap/workerless: "true"when a Shoot has zero worker pools. - Ensure the annotation is removed on subsequent reconciliations when a previously workerless Shoot gains workers.
- Add/adjust controller tests to cover workerless creation and the “workerless → workers added” transition.
File summaries
| File | Description |
|---|---|
| controller/shoot/shoot_controller.go | Detects workerless Shoots and sets/removes the greenhouse.sap/workerless annotation on the Greenhouse cluster Secret during reconciliation. |
| controller/shoot/shoot_controller_test.go | Updates fixtures to include worker pools where needed and adds test coverage for workerless annotation add/remove behavior. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mikolajkucinski
left a comment
There was a problem hiding this comment.
couple of small things :)
…nt and test description On-behalf-of: @SAP krzysztof.zagorski@sap.com Signed-off-by: Zaggy21 <k.zaggy@gmail.com>
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
Summary
greenhouse.sap/workerless: "true"annotation on the Greenhouse cluster secret for workerless shootsContext
Part of #1967. Workerless shoots (Gardener etcd-only clusters with no worker nodes) can never schedule pods. The
greenhouse.sap/workerlessannotation on the cluster secret is the signal the Greenhouse bootstrap controller uses to set cluster.spec.mode=Workerless, which in turn gates PayloadSchedulable and blocks Plugin deployments to those clusters.