-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Refactor packages to a more flattened structure #15
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
Conversation
pwittrock
commented
Jun 11, 2018
- move controller subpackages up a level
- decouple ControllerManager from Controller - put them in separate packages
- move cache related types from informers and client into a cache package
… to the new function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
) | ||
|
||
func main() { | ||
flag.Parse() | ||
logf.SetLogger(logf.ZapLogger(false)) | ||
|
||
// Setup a Manager | ||
manager, err := controller.NewManager(controller.ManagerArgs{}) | ||
mrg, err := manager.New(config.GetConfigOrDie(), manager.Options{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: mrg --> mgr
&source.KindSource{Type: &corev1.Pod{}}, | ||
&eventhandler.EnqueueHandler{}, | ||
&source.Kind{Type: &corev1.Pod{}}, | ||
&handler.Enqueue{}, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 New names are much better.
log.Fatal(err) | ||
} | ||
|
||
log.Fatal(manager.Start(signals.SetupSignalHandler())) | ||
log.Fatal(mrg.Start(signals.SetupSignalHandler())) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from end-user's perspective.
Refactor packages to a more flattened structure
Add docs for generating docs