grantr / helloworld-crd

Repository for sample controller. Complements sample-apiserver
Apache License 2.0
3 stars 2 forks source link

multi-resource controller #11

Closed mattmoor closed 6 years ago

mattmoor commented 6 years ago

It would be good to factor the code in a way to demo a Foo resource and a Bar resource.

Today it's just controller.go at the top-level.

mattmoor commented 6 years ago

So the linked PR breaks it into:

plugin.go <-- adds deps to the assorted controller so they get linked.
pkg/controller   <-- has controller registration functions and the entrypoint that main calls
pkg/controller/<resource> <-- has the controller for <resource>, which registers itself.