Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Commit

Permalink
Migrate natss channel off reconciler.Base and fix NATSS channel (#1078)
Browse files Browse the repository at this point in the history
* Migrate natss channel off reconciler.Base

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Update natss/pkg/reconciler/controller/natsschannel_test.go

Co-Authored-By: Matt Moore <[email protected]>

* Get recorder and stats reporter from context

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Get or build recorder and stats reporter

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Get logger from context

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Pull recorder and stats reporter from context

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Update codegen

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Migrate natss channel off reconciler.Base

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Get recorder and stats reporter from context

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Get or build recorder and stats reporter

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Get logger from context

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Pull recorder and stats reporter from context

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Update codegen

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Partial genreconciler

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Migrate natss to generated reconciler

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Add copyright

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* lint

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Test NewController()

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Pass rest.Config directly

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Fix test

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Update codegen

Signed-off-by: Pierangelo Di Pilato <[email protected]>

* Fix TestBrokerChannelFlow

Signed-off-by: Pierangelo Di Pilato <[email protected]>

Co-authored-by: Matt Moore <[email protected]>
  • Loading branch information
pierDipi and mattmoor authored Apr 3, 2020
1 parent f8f9d9a commit 3e94a36
Show file tree
Hide file tree
Showing 17 changed files with 862 additions and 471 deletions.
6 changes: 4 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions natss/cmd/channel_controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ func main() {
ctx = injection.WithNamespaceScope(ctx, ns)
}

cfg := sharedmain.ParseAndGetConfigOrDie()
sharedmain.MainWithConfig(ctx, component, cfg, func(ctx context.Context, watcher configmap.Watcher) *kncontroller.Impl {
return controller.NewController(ctx, watcher, cfg)
sharedmain.MainWithContext(ctx, component, func(ctx context.Context, watcher configmap.Watcher) *kncontroller.Impl {
return controller.NewController(ctx)
})
}
1 change: 1 addition & 0 deletions natss/pkg/apis/messaging/v1alpha1/natss_channel_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
)

// +genclient
// +genreconciler
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// NatssChannel is a resource representing a NATSS Channel.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3e94a36

Please sign in to comment.