Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
use get to get shoot
Browse files Browse the repository at this point in the history
  • Loading branch information
neo-liang-sap committed Dec 3, 2020
1 parent d26e6ac commit 8a0da1e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions pkg/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,14 +393,7 @@ func waitShootReconciled(shoot *gardencorev1beta1.Shoot, targetReader TargetRead
target := targetReader.ReadTarget(pathTarget)
gardenClientset, err := target.GardenerClient()
checkError(err)
shootList, err := gardenClientset.CoreV1beta1().Shoots(shoot.GetNamespace()).List(metav1.ListOptions{})
checkError(err)
for index, s := range shootList.Items {
if s.Name == shoot.Name && *s.Spec.SeedName == *shoot.Spec.SeedName {
newShoot = &shootList.Items[index]
break
}
}
newShoot, err = gardenClientset.CoreV1beta1().Shoots(shoot.GetNamespace()).Get(shoot.Name, metav1.GetOptions{})
checkError(err)
if newShoot.Status.LastOperation.State == "Succeeded" &&
newShoot.Status.LastOperation.Type == "Reconcile" &&
Expand Down

0 comments on commit 8a0da1e

Please sign in to comment.