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

Use background cascading deletion of DynamicPVC #1474

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

aubinmora
Copy link
Contributor

@aubinmora aubinmora commented Nov 22, 2023

follows fabric8io/kubernetes-client#2178 to use proper background cascading deletion preventing clients that cannot have access to finalizer to fail to create a pvc

This PR comes after hours of researching an issue on openshift https://access.redhat.com/solutions/4577161

the fabric8io dependancy changed the default cascading deletion to "background" 3 years ago.
In https://kubernetes.io/docs/concepts/architecture/garbage-collection/#cascading-deletion , we can see that blockOwnerDeletion=true is only used in foreground cascading deletion

But setting blockOwnerDeletion=true cause an issue with restricted Openshift environments where the serviceaccount cannot have access to finalizers

Setting it to false should default to use proper background cascading deletion

Testing not done

As I'm not a java developer, I cannot say that I know how to test or build the plugin. But the change follows the spec of the fabric8io library and of the kubernetes specification.

I would be more than willing to build and test it myself, but I would only have time to follow only simple steps

Submitter checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
    Options
  2. Ensure that the pull request title represents the desired changelog entry
    Options
  3. Please describe what you did
    Options
  4. Link to relevant issues in GitHub or Jira
    Options
  5. Link to relevant pull requests, esp. upstream and downstream changes
    Options
  6. Ensure you have provided tests - that demonstrates feature works or fixes the issue
    Options
Loading

follows fabric8io/kubernetes-client#2178 to use proper background cascading deletion preventing clients that cannot have access to finalizer to fail to create a pvc
@aubinmora aubinmora requested a review from a team as a code owner November 22, 2023 22:13
@Vlatombe Vlatombe changed the title Use background cascading deletion of DynamicPVC in Openshift Use background cascading deletion of DynamicPVC Nov 23, 2023
Copy link
Member

@Vlatombe Vlatombe left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, I reviewed it and I don't see any problem with it, since the pvc is still eventually deleted.

@Vlatombe Vlatombe added the enhancement Improvements label Nov 23, 2023
@Vlatombe Vlatombe merged commit ad406fb into jenkinsci:master Nov 23, 2023
5 of 6 checks passed
@Vlatombe Vlatombe mentioned this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements
Projects
None yet
2 participants