Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip annotating non existing resources #634

Merged
merged 1 commit into from Jan 18, 2023

Conversation

myaser
Copy link
Member

@myaser myaser commented Jan 18, 2023

Signed-off-by: Mahmoud Gaballah mahmoud.gaballah@zalando.de

@@ -1170,6 +1170,10 @@ func overrideDeletionProtection(ctx context.Context, kind, name string, iface dy
return err
}
_, err = iface.Patch(ctx, name, k8stypes.JSONPatchType, payload, metav1.PatchOptions{})
if err != nil && apierrors.IsNotFound(err) {
logger.Infof("Skipping deletion of %s %s: resource not found", kind, name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line will be logged twice I believe.

Signed-off-by: Mahmoud Gaballah <mahmoud.gaballah@zalando.de>
@myaser myaser force-pushed the annotate-resources-for-deletion branch from 8da6339 to d132a46 Compare January 18, 2023 09:47
@linki
Copy link
Member

linki commented Jan 18, 2023

👍

1 similar comment
@myaser
Copy link
Member Author

myaser commented Jan 18, 2023

👍🏻

@myaser myaser merged commit b656568 into master Jan 18, 2023
@myaser myaser deleted the annotate-resources-for-deletion branch January 18, 2023 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants