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

Issue 300: Zookeeper Operator pre-delete hook #301

Merged
merged 2 commits into from
Feb 9, 2021

Conversation

SrishT
Copy link
Contributor

@SrishT SrishT commented Feb 4, 2021

Signed-off-by: SrishT [email protected]

Change log description

Provides a pre-delete hook which ensures that custom resources are deleted before deleting the operator.

Purpose of the change

Fixes #300

What the code does

Allows the operator to be deleted via helm only if the zookeepercluster custom resource has already been deleted, not otherwise.

How to verify it

  • If you try to delete the zookeeper operator before having deleted the zookeeper cluster resource, the pre-delete job will fail, thereby not allowing the operator from being deleted.
  • If you try to delete the zookeeper operator after the zookeeper cluster resource has been cleaned up successfully, the operator will also be successfully deleted.

@SrishT SrishT requested review from jkhalack and anishakj February 4, 2021 18:15
@codecov-io
Copy link

Codecov Report

Merging #301 (2a72101) into master (b875bba) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #301   +/-   ##
=======================================
  Coverage   84.64%   84.64%           
=======================================
  Files          11       11           
  Lines        1309     1309           
=======================================
  Hits         1108     1108           
  Misses        133      133           
  Partials       68       68           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b875bba...2a72101. Read the comment docs.

Copy link
Contributor

@jkhalack jkhalack left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@anishakj anishakj left a comment

Choose a reason for hiding this comment

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

Do we need to ensure role and role bindings deleted in addition to the cluster role?

@SrishT
Copy link
Contributor Author

SrishT commented Feb 9, 2021

Do we need to ensure role and role bindings deleted in addition to the cluster role?

@anishakj we are only ensuring that the zookeepercluster custom resource has only been deleted before triggering the delete. We are not checking for the RBAC being already deleted since it is going to be deleted by this chart itself.

Copy link
Contributor

@anishakj anishakj left a comment

Choose a reason for hiding this comment

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

LGTM

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.

No pre-delete hook in zookeeper-operator chart
4 participants