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

WIP: Add operand cleanup implementation #2030

Closed
wants to merge 2 commits into from

Conversation

hasbro17
Copy link
Contributor

@hasbro17 hasbro17 commented Mar 4, 2021

Description of the change:
This PR introduces the operand cleanup feature which enables a CSV to be configured so the OLM operator can clean up CRs on operator uninstall or CSV deletion.

Adds the logic for opt-in/opt-out for operand cleanup and adds a finalizer that runs through the cleanup steps for removing CRs and updating the status.

Associated CSV API changes: operator-framework/api#100

Motivation for the change:

Enhancement: https://github.com/operator-framework/enhancements/blob/master/enhancements/olm-deletes-operands.md
Closes: #1787

TODO:

  • Unit tests
  • E2E tests
  • Docs for the OLM website
  • Update the CSV design doc for the new APIs

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 4, 2021
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hasbro17
To complete the pull request process, please assign benluddy after the PR has been reviewed.
You can assign the PR to them by writing /assign @benluddy in a comment when ready.

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

Needs approval from an approver in each of these files:

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

This commit introduces the operand cleanup feature which enables a
CSV to be configured so the OLM operator can clean up CRs on operator
uninstall or CSV deletion.

Adds the logic for opt-in/opt-out for operand cleanup and adds a finalizer
that runs through the cleanup steps for removing CRs and updating the status.
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 4, 2021
@hasbro17
Copy link
Contributor Author

hasbro17 commented Mar 4, 2021

/hold

Waiting to finish up some small TODOs and add unit and e2e tests.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 4, 2021
@openshift-ci
Copy link

openshift-ci bot commented Mar 6, 2021

@hasbro17: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-gcp cd37de1 link /test e2e-gcp
ci/prow/e2e-aws-olm cd37de1 link /test e2e-aws-olm

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-ci-robot
Copy link
Collaborator

@hasbro17: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 21, 2021
@hasbro17
Copy link
Contributor Author

Closing this for now since there are a lot of unintended risks and caveats with the implementing operand cleanup on the server side in its current form.

See: https://github.com/operator-framework/enhancements/pull/71/files and https://hackmd.io/HgLaQSyHTXuPpnyqzsM0SQ

@hasbro17 hasbro17 closed this Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFE] OLM deletes Operands upon Operator removal
2 participants