Skip to content

Commit

Permalink
Do not ignore the updated shoot to prevent empty .status.uid
Browse files Browse the repository at this point in the history
```bugfix operator
An issue causing gardenlet to do not properly compute the `.status.clusterIdentity` field is now fixed.
```

Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
  • Loading branch information
ialidzhikov committed Jan 11, 2021
1 parent de596d1 commit b9a4257
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/gardenlet/controller/shoot/shoot_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,14 +468,16 @@ func (c *Controller) reconcileShoot(logger *logrus.Entry, shoot *gardencorev1bet

// write UID to status when operation was created successfully once
if len(o.Shoot.Info.Status.UID) == 0 {
if _, err := kutil.TryUpdateShootStatus(ctx, gardenClient.GardenCore(), retry.DefaultRetry, o.Shoot.Info.ObjectMeta,
newShoot, err := kutil.TryUpdateShootStatus(ctx, gardenClient.GardenCore(), retry.DefaultRetry, o.Shoot.Info.ObjectMeta,
func(shoot *gardencorev1beta1.Shoot) (*gardencorev1beta1.Shoot, error) {
shoot.Status.UID = shoot.UID
return shoot, nil
},
); err != nil {
)
if err != nil {
return reconcile.Result{}, err
}
o.Shoot.Info = newShoot
}

// At this point the reconciliation is allowed, hence, check if the seed is up-to-date, then sync the Cluster resource
Expand Down

0 comments on commit b9a4257

Please sign in to comment.