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 SharedInformerFactory instead of cache.Informer #146

Merged
merged 3 commits into from Aug 9, 2019

Conversation

@PrasadG193
Copy link
Member

@PrasadG193 PrasadG193 commented Aug 8, 2019

ISSUE TYPE
  • Refactoring
SUMMARY

This PR includes following fixes:

  • Use SharedInformerFactory instead of cache.Informer
  • Improve event filtering logic
  • Fix timestamp for deployment/statefulset delete event
  • Fix job_status_checker filter to allow create events

Fixes #143

@PrasadG193
Copy link
Member Author

@PrasadG193 PrasadG193 commented Aug 8, 2019

cc: @aananthraj

Copy link
Contributor

@codenio codenio left a comment

we could remove this function since we won't be using it anymore.

func findNamespace(ns string) string {
if ns == "all" {
return apiV1.NamespaceAll
}
if ns == "" {
return apiV1.NamespaceDefault
}
return ns
}

@sanketsudake
Copy link
Member

@sanketsudake sanketsudake commented Aug 9, 2019

Please see if you can followup on below items.

  1. Add update notes regarding configuration changes
  2. Identify if any performance benefits - CPU & Memory with this approach, just simple kubectl top
  3. This should not break any existing functionalities, no regressions. We should add related tests. I know you have plan to add tests in another PR

PrasadG193 added 3 commits Aug 9, 2019
Improve event filtering logic
Fix timestamp for deployment/statefulset delete event

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
@PrasadG193
Copy link
Member Author

@PrasadG193 PrasadG193 commented Aug 9, 2019

Add update notes regarding configuration changes

Sure

Identify if any performance benefits - CPU & Memory with this approach, just simple kubectl top

@ssudake21 CPU usage has been reduced from 2m to 0m in idle condition as well as little workload. Memory usage is somewhat similar to older changes i.e around 15Mi.

This should not break any existing functionalities, no regressions. We should add related tests. I know you have plan to add tests in another PR

We need these changes to start adding integration tests. I'll fix if I find any issue as a part of that PR

@PrasadG193 PrasadG193 merged commit fc5362b into infracloudio:develop Aug 9, 2019
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
Linked issues

Successfully merging this pull request may close these issues.

3 participants