Skip to content

Commit

Permalink
Prevent optimistic lock errors during 'MaintainShootAnnotations' step
Browse files Browse the repository at this point in the history
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>

```improvement user
An issue causing Shoot reconciliation to fail at `Maintain shoot annotations` with optimistic lock error message is now mitigated.
```
  • Loading branch information
ialidzhikov authored and rfranzke committed Aug 20, 2020
1 parent f3193b7 commit 23fc2d1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/gardenlet/controller/shoot/shoot_control_reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,6 @@ func (c *Controller) runReconcileShootFlow(o *operation.Operation) *gardencorev1
Fn: flow.TaskFn(botanist.WaitUntilExtensionResourcesDeleted).SkipIf(o.Shoot.HibernationEnabled),
Dependencies: flow.NewTaskIDs(deleteStaleExtensionResources),
})
_ = g.Add(flow.Task{
Name: "Maintain shoot annotations",
Fn: flow.TaskFn(botanist.MaintainShootAnnotations),
Dependencies: flow.NewTaskIDs(deleteStaleExtensionResources),
})
deployContainerRuntimeResources = g.Add(flow.Task{
Name: "Deploying container runtime resources",
Fn: flow.TaskFn(botanist.DeployContainerRuntimeResources).RetryUntilTimeout(defaultInterval, defaultTimeout),
Expand All @@ -424,11 +419,16 @@ func (c *Controller) runReconcileShootFlow(o *operation.Operation) *gardencorev1
Fn: flow.TaskFn(botanist.RestartControlPlanePods).DoIf(requestControlPlanePodsRestart),
Dependencies: flow.NewTaskIDs(deployKubeControllerManager, deployControlPlane, deployControlPlaneExposure),
})
_ = g.Add(flow.Task{
deployVPA = g.Add(flow.Task{
Name: "Deploying Kubernetes vertical pod autoscaler",
Fn: flow.TaskFn(botanist.DeployVerticalPodAutoscaler).RetryUntilTimeout(defaultInterval, defaultTimeout),
Dependencies: flow.NewTaskIDs(deploySecrets, waitUntilKubeAPIServerIsReady, deployManagedResources, hibernateControlPlane),
})
_ = g.Add(flow.Task{
Name: "Maintain shoot annotations",
Fn: flow.TaskFn(botanist.MaintainShootAnnotations),
Dependencies: flow.NewTaskIDs(deployVPA),
})
)

for k, v := range botanist.Shoot.Components.Extensions.DNS.AdditionalProviders {
Expand Down

0 comments on commit 23fc2d1

Please sign in to comment.