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

Ensure that DeletionTimestamp exists before patching the finalizers #1921

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

YCShen1010
Copy link
Contributor

Ticket:
https://github.ibm.com/IBMPrivateCloud/roadmap/issues/61273
https://github.ibm.com/IBMPrivateCloud/roadmap/issues/61040

Issue description

In the AllNamespace/SingleNamespace migration path, NSS NamespaceScope resources failed to be deleted automatically during the initial run. However, upon restarting the CS pod, they will eventually be removed

Enhancement

  • Adding a check to get the DeletionTimestamp in the PollImmediate function to address the timing issue where the deletion timestamp might not be available immediately after deletion
  • List all NSS resources again to ensure that the DeletionTimestamp exists in all the resources before patching the finalizers

How to verify

Test image: quay.io/yuchen_shen/cs_operator:nss_cleanup

  1. Deploy v4 CS instance in AllNamespace Mode
  2. Manually create some NamespaceScope resources under ibm-common-services ns
  3. Before applying the image: restart CS pod(only once), those resources will not be deleted
    After applying the image: restart CS pod(only once), those resources will be deleted eventualy

Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca>
Copy link
Contributor

@Daniel-Fan Daniel-Fan left a comment

Choose a reason for hiding this comment

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

/lgtm

@ibm-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Daniel-Fan, YCShen1010

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Daniel-Fan,YCShen1010]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ibm-ci-bot ibm-ci-bot merged commit fcf99e2 into IBM:master Apr 16, 2024
5 of 9 checks passed
@YCShen1010 YCShen1010 deleted the nss_cleanup branch April 16, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants