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

(finalizers): refactor #124

Merged
merged 3 commits into from
Jan 14, 2024

Conversation

itamar-marom
Copy link
Collaborator

@itamar-marom itamar-marom commented Dec 27, 2023

Description

Code refactoring to the finalizers' logic. Added also tests.
I didn't refactor the entire code since its complicated to do all at once.


This PR has:

  • been tested on a real K8S cluster to ensure creation of a brand new Druid cluster works.
  • been tested for backward compatibility on a real K*S cluster by applying the changes introduced here on an existing Druid cluster. If there are any backward incompatible changes then they have been noted in the PR description.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Key changed/added files in this PR
  • controllers/druid/finalizers.go
  • controllers/druid/finalizers_test.go
  • controllers/druid/handler.go
  • controllers/druid/suite_test.go

@itamar-marom itamar-marom marked this pull request as ready for review December 27, 2023 16:55
Comment on lines 93 to 95
msg := fmt.Sprintf("Trigerring finalizer for CR [%s] in namespace [%s]", m.Name, m.Namespace)
// sendEvent(sdk, m, v1.EventTypeNormal, DruidFinalizer, msg)
logger.Info(msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

as we our refactoring, we can convert this to an event.

controllers/druid/finalizers.go Outdated Show resolved Hide resolved
@AdheipSingh AdheipSingh merged commit da563de into datainfrahq:master Jan 14, 2024
1 check passed
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.

2 participants