Skip to content

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

Merged
merged 9 commits into from
Jun 11, 2018

Conversation

pwittrock
Copy link
Contributor

  • 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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 11, 2018
Copy link
Contributor

@droot droot left a 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{})
Copy link
Contributor

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{},
)
Copy link
Contributor

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()))
}

Copy link
Contributor

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.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 11, 2018
@pwittrock pwittrock added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 11, 2018
@k8s-ci-robot k8s-ci-robot merged commit 20db4b7 into kubernetes-sigs:master Jun 11, 2018
justinsb pushed a commit to justinsb/controller-runtime that referenced this pull request Dec 7, 2018
Refactor packages to a more flattened structure
DirectXMan12 pushed a commit that referenced this pull request Jan 31, 2020
Add docs for generating docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants