-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eliminate the Worker
State Reconciler
#8559
Conversation
/assign |
60d2686
to
ea160fc
Compare
ea160fc
to
f212fe3
Compare
f212fe3
to
0cd3c33
Compare
0cd3c33
to
47b5c35
Compare
/assign |
47b5c35
to
aa3bd89
Compare
aa3bd89
to
8f15db7
Compare
8f15db7
to
bb5d1d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR and as usual very understandable 👏 😄
Some minor points, rest looks good to me.
extensions/pkg/controller/worker/genericactuator/actuator_restore_test.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Now `gardenlet` persists the machine state as part of `shootstate.Deploy`. This function is executed after all extension resources were migrated.
Will be needed in `botanist/migration.go` in a subsequent commit.
Now that the `gardenlet` persists the machine state explicitly, we do not need to duplicate it via the `Worker` state.
- For backwards-compatibility, we have to keep this flow since the generic `Worker` actuator's `Restore` function expects to find the state in the `Worker`'s `.status.state` field: https://github.com/gardener/gardener/blob/422e2bbedd23351383154bb733838a416f39f2b6/extensions/pkg/controller/worker/genericactuator/actuator_restore.go#L121C1-L141 - This is somewhat dirty for now, but probably acceptable given that this was the flow for the past years. - A subsequent commit will adapt the generic `Worker` actuator to fetch the state from elsewhere, however we have to wait until all provider extensions have been re-vendored with the new logic before we change this here.
…luster This is to prevent `gardenlet` from duplicating the machine state into the destination seed cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 9a306655be5d3e65493773d9f178233a223eb630
|
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: timuthy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@rfranzke: The following test failed, say
Full PR test history. Your PR dashboard. Command help for this repository. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/test pull-gardener-unit |
follow-up of gardener#8559, released with `v1.82.0`
* Remove MCM legacy CRD deletion follow-up of #8559, released with `v1.82.0` * Remove legacy `shoot-node-logging` MR cleanup follow-up of #8501, released with `v1.80.0` * Remove MCM legacy resources cleanup in generic `Worker` actuator follow-up of #8596, released with `v1.82.0` * Restrict GRM's token requestor to secrets with `class=shoot` follow-up of #8152, released with `v1.74.0` * Remove support for deprecated `NetworkPolicy` annotations follow-up of #7907, released with `v1.71.0`
How to categorize this PR?
/area scalability cost
/kind enhancement
What this PR does / why we need it:
This PR drops the
Worker
state reconciler that currently is auto-added to allWorker
controllers. Please see GEP-22 for information about the motivation.With this PR, the migration flow is adapted as follows:
gardenlet
collects machine state and persists it in theShootState
under.spec.gardener[].type=machine-state
.gardenlet
shallow-deletes the machine-related resources (this was previously done by the genericWorker
actuator).gardenlet
no longer persists the state stored in.status.state
ofWorker
resources (to not duplicate the machine state in theShootState
).The restoration flow is adapted as follows:
Worker
actuator tries to read the machine state directly from theShootState
in the garden cluster (which is now possible since Garden Cluster Access For Extensions In Seed Clusters #8001). This alleviates the necessity to letgardenlet
read it and populate it somehow to the destination seed for the provider extensions to pick up - they can do it directly.gardenlet
fetches the machine state from theShootState
's.spec.gardener[]
field (previously, the machine state was fetched from.spec.extensions[].kind=Worker
) and still populates it to theWorker
's.status.state
field. This is just to preserve backwards-compatibility, because registered extensions might not yet have vendored the newest library, hence they might still rely on this field during restoration. This will be dropped in a future version.The PR also addresses a TODO leftover task from #8082 about only persisting the
ShootState
after all extension resources have been migrated.Which issue(s) this PR fixes:
Fixes #8488
Special notes for your reviewer:
github.com/gardener/machine-controller-manager
was revendored to0.50.0
according to [ci:component:github.com/gardener/machine-controller-manager:v0.49.3->v0.50.0] #8539. In this version, the legacy provider-specific API types are cleaned up. The revendoring was needed to make themachine.sapcloud.io/v1alpha1
CRDs available for the integration tests.MachineClass
-related methods were dropped from the genericWorker
actuator interface./cc @plkokanov
Release note: