diff --git a/controllers/kustomization_controller.go b/controllers/kustomization_controller.go index 3ff43101..5ced97c1 100644 --- a/controllers/kustomization_controller.go +++ b/controllers/kustomization_controller.go @@ -762,13 +762,13 @@ func (r *KustomizationReconciler) apply(ctx context.Context, manager *ssa.Resour changeSetLog.WriteString(change.String() + "\n") } } - } - if err := manager.Wait(defStage, ssa.WaitOptions{ - Interval: 2 * time.Second, - Timeout: kustomization.GetTimeout(), - }); err != nil { - return false, nil, err + if err := manager.WaitForSet(changeSet.ToObjMetadataSet(), ssa.WaitOptions{ + Interval: 2 * time.Second, + Timeout: kustomization.GetTimeout(), + }); err != nil { + return false, nil, err + } } } @@ -787,13 +787,13 @@ func (r *KustomizationReconciler) apply(ctx context.Context, manager *ssa.Resour changeSetLog.WriteString(change.String() + "\n") } } - } - if err := manager.Wait(classStage, ssa.WaitOptions{ - Interval: 2 * time.Second, - Timeout: kustomization.GetTimeout(), - }); err != nil { - return false, nil, err + if err := manager.WaitForSet(changeSet.ToObjMetadataSet(), ssa.WaitOptions{ + Interval: 2 * time.Second, + Timeout: kustomization.GetTimeout(), + }); err != nil { + return false, nil, err + } } } diff --git a/controllers/kustomization_wait_test.go b/controllers/kustomization_wait_test.go index 36fad1e8..83c25674 100644 --- a/controllers/kustomization_wait_test.go +++ b/controllers/kustomization_wait_test.go @@ -56,6 +56,17 @@ metadata: name: %[1]s data: key: "%[2]s" +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: aws-efs + namespace: was-system +provisioner: aws-efs +parameters: + gidMin: "2200" + gidMax: "2299" + gidAllocate: "true" `, name, data), }, }