mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-14 13:17:39 +00:00
cleanup return if appliedmainfestWork is notfound (#312)
Signed-off-by: Zhiwei Yin <zyin@redhat.com> Signed-off-by: Zhiwei Yin <zyin@redhat.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user