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

EVEREST-107 remove dead code #1047

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

recharte
Copy link
Collaborator

@recharte recharte commented Jan 23, 2025

EVEREST-107 Powered by Pull Request Badge

@recharte recharte marked this pull request as ready for review January 23, 2025 23:19
@recharte recharte requested a review from a team as a code owner January 23, 2025 23:19
@recharte recharte enabled auto-merge (squash) January 23, 2025 23:19
Comment on lines 102 to 111
// OnAdd is triggered when an object is added.
func (i *Informer) OnAdd(cb func(obj interface{})) {
i.eventHandlers.AddFunc = cb
}

// OnDelete is triggered when an object is deleted.
func (i *Informer) OnDelete(cb func(obj interface{})) {
i.eventHandlers.DeleteFunc = cb
}

Copy link
Member

Choose a reason for hiding this comment

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

I would actually not remove this, they are a part of the Informer utility. We are currently using only OnUpdate for reloading the RBAC configMap, but it is possible to use OnAdd and onDelete too for other use-cases.

What I mean is this is a generic helper library to watch Kubernetes events and perform actions, so without these 2 methods, the library is kind of incomplete even though we aren't using it anywhere 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Restored

@recharte recharte disabled auto-merge January 24, 2025 09:34
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