Skip to content

Commit

Permalink
cleanup return if appliedmainfestWork is notfound (open-cluster-manag…
Browse files Browse the repository at this point in the history
…ement-io#312) (#34)

Signed-off-by: Zhiwei Yin <[email protected]>

Signed-off-by: Zhiwei Yin <[email protected]>
(cherry picked from commit 539b6ee)
  • Loading branch information
zhiweiyin318 authored Nov 16, 2023
1 parent 0d54d24 commit 16762cc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ func (r *managedReconcile) clean(ctx context.Context, klusterlet *operatorapiv1.
// the hash of the given hub host.
func (r *managedReconcile) cleanUpAppliedManifestWorks(ctx context.Context, klusterlet *operatorapiv1.Klusterlet, config klusterletConfig) error {
appliedManifestWorks, err := r.managedClusterClients.appliedManifestWorkClient.List(ctx, metav1.ListOptions{})
if errors.IsNotFound(err) {
return nil
}
if err != nil {
return fmt.Errorf("unable to list AppliedManifestWorks: %w", err)
}
Expand Down

0 comments on commit 16762cc

Please sign in to comment.