* Profiling support
* Move ProfilingPort to profiling package
* Fix golint errors
* Refactor watcher to accept variable length observers
* Cleaner happy path
* Remove profiling handlers argument
* use :8008 string as const
* Make the profiling port package private
* Make UpdateFromConfigMap member of profiling handler
* use mutex when accessing the enabled flag
* test the server as well
* Fixes
* Initialize profiling from configMap at startup
* Use httptest.ResponseRecorder to make the test more lightweight
* Fixes
* Do not initialize from configmap at startup
* Read the logging configmap via API, not from the file system.
This makes it possible to run our controllers locally which can be super handy for quick development cycles.
* Use NewConfigFromConfigMap to avoid conversion.
* Implement a fallback mechanism and create a public helper.
* Remove some duplication.
* Rolling back some of the changes.
Our config loading currently only tries the given flags or in-cluster config. This also adds the KUBECONFIG env variable and the user's home directoy as fallback solutions to find a valid configuration.
That helps running our controllers locally with minimal effort.
This creates a base library that enables us to leverage the dependency
graph to convey injection dependencies. Our controllers will start
to get their informers off of a `context.Context` via `fooinformers.Get(ctx)`.
By simply linking `fooinformers` to access the informer in this way, we trigger
a cascade of `init`-time registrations for the informer, and its transitive
dependencies (e.g. shared informer factory, client).
The `ctx` is infused with these informers in `package main` by linking the
appropriate reconcilers (transitively registering everything) and then calling
`sharedmain.Main()` (from `github.com/knative/pkg/injection/sharedmain`).